<s> """<STR_LIT>""" <EOL> import pytest <EOL> from tests . base import TestBase <EOL> from statsite . metrics_store import GraphiteStore , MetricsStore <EOL> class TestMetricsStore ( TestBase ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> class TestGraphiteStore ( TestBase ) : <EOL> def test_flushes ( self , graphite ) : <EOL> """<STR_LIT>""" <EOL> store = GraphiteStore ( graphite . host , graphite . port , prefix = "<STR_LIT>" ) <EOL> metrics = [ ( "<STR_LIT:k>" , <NUM_LIT:1> , <NUM_LIT:10> ) , ( "<STR_LIT>" , <NUM_LIT:2> , <NUM_LIT:20> ) ] <EOL> store . flush ( metrics ) <EOL> store . close ( ) <EOL> def check ( ) : <EOL> metric_strings = [ "<STR_LIT>" % metric for metric in metrics ] <EOL> assert metric_strings == graphite . messages <EOL> self . after_flush_interval ( check , interval = <NUM_LIT:1> ) </s>
