def test_succeed_normally(self): with self.fake_request: self.assertStatus(api.post_trans(dbsrv=self.sm), 200)
def test_fail_if_bad_json(self): with app.test_request_context(data="garbage"): api.post_trans(dbsrv=self.sm)