def test_vote_already_authed(self): token = factories.AuthTokenFactory() token.save() chat, _ = Chat.objects.get_or_create(**self.update.message.chat.to_dict()) token.chat_api = chat token.save() self._test_message_ok(self.vote_authed)
def test_login_required_expired_token(self): token = factories.AuthTokenFactory() token.save() chat, _ = self.chat_get_or_create() token.chat_api = chat token.save() AuthorFactory(name="author_1") self._test_message_ok(self.author_login_required_not_auth)
def test_login_required_expired_token(self): token = factories.AuthTokenFactory() token.save() chat, _ = Chat.objects.get_or_create(**self.update.message.chat.to_dict()) token.chat_api = chat token.save() AuthorFactory(name="author_1") self._test_message_ok(self.author_login_required_not_auth)
#!/usr/bin/env python