<s> from twisted . trial import unittest <EOL> from nodeset . core . stats import metric , types <EOL> class MetricStoreTest ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> self . m = metric . Metric ( '<STR_LIT>' , types . Counter ) <EOL> def test_StoreGet ( self ) : <EOL> self . m . update ( ) <EOL> self . assertTrue ( self . m . get ( ) == <NUM_LIT:1> ) <EOL> om = metric . Store . get ( '<STR_LIT>' ) <EOL> self . assertTrue ( om . get ( ) == <NUM_LIT:1> ) <EOL> def test_StoreUpdate ( self ) : <EOL> om = metric . Store . get ( '<STR_LIT>' ) <EOL> om . update ( ) <EOL> self . assertTrue ( self . m . get ( ) == <NUM_LIT:1> ) <EOL> def test_StoreMetric ( self ) : <EOL> om = metric . Store . get ( '<STR_LIT>' ) <EOL> self . assertTrue ( self . m == om ) </s>
