tests.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:ComBunqWebApp 作者: OGKevin 项目源码 文件源码
def test_load_file(self, mock, _):
        mock.register_uri(requests_mock.ANY, self.installation,
                          json=self.get_installation)
        mock.register_uri(requests_mock.ANY, self.attachemt_pubilc,
                          content=self.get_avatar)
        mock.register_uri(requests_mock.ANY, self.session_server,
                          json=self.get_start_session)
        mock.register_uri(requests_mock.ANY, self.accounts,
                          json=self.get_accounts)
        mock.register_uri(requests_mock.ANY, self.payment,
                          json=self.get_payments)

        # c = callback(user=self.user)
        self.c.load_file()
        self.c.account_id = self.fake.random_number()
        self.c.payment_id = self.fake.random_number()
        self.c.load_file()  # NOTE: need to find an assertion for this.
        # assertEqual doesnt do the job due to the order
        # of the JSON's
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号