test_post.py 文件源码

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

项目:myAPI 作者: butomo1989 项目源码 文件源码
def test_invalid_date(self):
        payload = {'name': 'budi2', 'gender': Employee.Gender.MALE,
                   'birthdate': 'test', 'active': True}
        res = self.test_app.post('/employee', headers=self.headers, data=json.dumps(payload))
        self.assertEqual(res.status_code, 400)
        from sqlalchemy.exc import DataError
        self.assertRaises(DataError)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号