Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 def test_can_override_only_existing_attributes(self):
     # should raise AssertionError
     assert_raises(AssertionError, lambda: Category.example(foo=u'bar'))
Ejemplo n.º 3
0
 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)
Ejemplo n.º 4
0
 def test_can_override_only_existing_attributes(self):
     # should raise AssertionError
     assert_raises(AssertionError, lambda: Category.example(foo=u'bar'))
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 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)
 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)