def test_create_default_groups(database):
 assert (Group.query.count() == 0)
 create_default_groups()
 assert (Group.query.count() == len(group_fixture))
 for (key, attributes) in group_fixture.items():
  group = Group.query.filter_by(name=key).first()
  for (attribute, value) in attributes.items():
   assert (getattr(group, attribute) == value)

def test_create_default_groups ( database ) : assert ( Group . query . count ( ) == 0 ) create_default_groups ( ) assert ( Group . query . count ( ) == len ( group_fixture ) ) for ( key , attributes ) in group_fixture . items ( ) : group = Group . query . filter_by ( name = key ) . first ( ) for ( attribute , value ) in attributes . items ( ) : assert ( getattr ( group , attribute ) == value )
test that the default groups are created correctly .