def test_can_override_only_existing_attributes(self): # should raise AssertionError assert_raises(AssertionError, lambda: Category.example(foo=u'bar'))
def test_can_override_example_data(self): category = Category.example(name=u'Bar') assert_equals(u'Bar', category.name) assert_equals(u'bar', category.slug)
def test_can_create_example_category(self): category = Category.example() assert_not_none(category) assert_equals(u'Foo', category.name) assert_equals(u'foo', category.slug) assert_equals(0, category.parent_id)