Exemplo n.º 1
0
from yunity.utils.tests.mock import MockCategory

parent_category = MockCategory.create()
Exemplo n.º 2
0
from yunity.utils.tests.mock import MockCategory

parent_category = MockCategory.create()
existing_category = MockCategory.create()
Exemplo n.º 3
0
 def test_validate_category_parent_passes(self):
     self.given_data(MockCategory.create().id)
     self.when_calling(types.category_parent)
     self.then_invocation_passed_with(AnyResult())
Exemplo n.º 4
0
from yunity.utils.tests.mock import MockCategory

categories = MockCategory.create_batch(10)
Exemplo n.º 5
0
 def test_validate_category_name_fails_with_existing_category(self):
     self.given_data(MockCategory.create().name)
     self.when_calling(types.category_name)
     self.then_invocation_failed_with(ValidationFailure)