UPD: improved the providing of real test data.

This commit is contained in:
2019-04-04 11:51:03 +02:00
parent b31b7e8a44
commit d2c52a27e7
6 changed files with 89 additions and 38 deletions

View File

@@ -54,7 +54,7 @@ class ActionTestCase(EmailTestMixin, RoleMixin, EventMixin, TestCase):
return uuid
def _test_status_update(self, status_code, user):
event = self.create_event(TEST_EVENT_DATA)
event = self.create_event_by_model(TEST_EVENT_DATA)
self.submit_event(event)
if status_code in ('publishing_web', 'publishing_facebook'):
@@ -142,7 +142,7 @@ class ActionTestCase(EmailTestMixin, RoleMixin, EventMixin, TestCase):
self._test_status_update('accepted', self.manager_w)
def test_accept_repeated(self):
event = self.create_event(TEST_EVENT_DATA)
event = self.create_event_by_model(TEST_EVENT_DATA)
self.submit_event(event)
action_parameters = '{},accepted,{}'.format(event.id, self.manager_super.id)
@@ -154,7 +154,7 @@ class ActionTestCase(EmailTestMixin, RoleMixin, EventMixin, TestCase):
self._assertRepeated(response)
def test_accepted_already(self):
event = self.create_event(TEST_EVENT_DATA)
event = self.create_event_by_model(TEST_EVENT_DATA)
self.submit_event(event)
action_parameters = '{},accepted,{}'.format(event.id, self.manager_super.id)