chore: улучшен интерфейс работы с моделями
This commit is contained in:
1 parent
6cfb00a847
commit
adab286884
6 files changed
+175
-89
No files matched your search
@@ -143,8 +143,7 @@ class PointMenuTests(BotTestCase):
|
||||
super().setUp()
|
||||
self.say('/start')
|
||||
self.point = create_point(TelegramUser.objects.get())
|
||||
self.point.status = Point.Status.READY
|
||||
self.point.save()
|
||||
self.point.set_status(Point.Status.READY)
|
||||
|
||||
def open_point(self):
|
||||
self.say(texts.MANAGE)
|
||||
@@ -175,8 +174,7 @@ class PointMenuTests(BotTestCase):
|
||||
|
||||
@mock.patch.object(tasks.release_point, 'send')
|
||||
def test_busy_point(self, send):
|
||||
self.point.status = Point.Status.INSTALLING
|
||||
self.point.save()
|
||||
self.point.set_status(Point.Status.INSTALLING)
|
||||
self.open_point()
|
||||
self.assertEqual(self.say(texts.RELEASE), texts.POINT_BUSY.format(status='устанавливается'))
|
||||
send.assert_not_called()
|
||||
|
||||
Reference in new issue
Block a user