@step('There should be (\\d+) ([a-z][a-z0-9_ ]*) in the database')
def model_count(step, count, model):
 model = get_model(model)
 expected = int(count)
 found = model.objects.count()
 assert (found == expected), ('Expected %d %s, found %d.' % (expected, model._meta.verbose_name_plural, found))

@ step ( 'There should be (\\d+) ([a-z][a-z0-9_ ]*) in the database' ) def model_count ( step , count , model ) : model = get_model ( model ) expected = int ( count ) found = model . objects . count ( ) assert ( found == expected ) , ( 'Expected %d %s, found %d.' % ( expected , model . _meta . verbose_name_plural , found ) )
then there should be 0 goals in the database .