示例#1
0
    def test_save_github_user_data(self):
        User.drop_collection()
        github_user = '******'
        chat_id = 'id'
        github_user_id = 'git_id'
        user = User()
        user.github_user = github_user
        user.save()
        user.save_github_user_data(github_user, chat_id, github_user_id)

        user_db = User.objects(github_user=github_user).first()
        self.assertEqual(user, user_db)
示例#2
0
 def setup(self):
     super().setUp()
     User.drop_collection()