コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
 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)
コード例 #4
0
#!/usr/bin/env python