Пример #1
0
from yunity.utils.tests.mock import MockCategory

parent_category = MockCategory.create()
Пример #2
0
from yunity.utils.tests.mock import MockCategory

parent_category = MockCategory.create()
existing_category = MockCategory.create()
Пример #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())
Пример #4
0
from yunity.utils.tests.mock import MockCategory

categories = MockCategory.create_batch(10)
Пример #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)