def test_tag():
 class DummyModel(Model, ):
  'The simplest instance of Model possible.'
 x = DummyModel()
 x.tag['foo']['bar'] = 5
 assert (len(x.tag.keys()) == 1)
 assert (len(x.tag['foo'].keys()) == 1)
 assert (x.tag['foo']['bar'] == 5)
 assert ('bar' not in x.tag)
 x.tag['bar']['baz'] = 3
 assert ('bar' in x.tag)
 assert ('baz' in x.tag['bar'])
 assert (len(x.tag.keys()) == 2)

def test_tag ( ) : class DummyModel ( Model , ) : x = DummyModel ( ) x . tag [ 'foo' ] [ 'bar' ] = 5 assert ( len ( x . tag . keys ( ) ) == 1 ) assert ( len ( x . tag [ 'foo' ] . keys ( ) ) == 1 ) assert ( x . tag [ 'foo' ] [ 'bar' ] == 5 ) assert ( 'bar' not in x . tag ) x . tag [ 'bar' ] [ 'baz' ] = 3 assert ( 'bar' in x . tag ) assert ( 'baz' in x . tag [ 'bar' ] ) assert ( len ( x . tag . keys ( ) ) == 2 )
test that the tag attribute works correctly .