diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2017-11-24 12:30:17 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2017-11-24 12:30:17 +0100 |
commit | a47bf3dd04d182638fedf0f6edb99b73fc1efd3e (patch) | |
tree | eced6dc9343ea45ee221770da86107fc4235d719 /talersurvey | |
parent | b17113a35a5f4fa01d9bfb66e871247a2ac51eb0 (diff) | |
download | survey-a47bf3dd04d182638fedf0f6edb99b73fc1efd3e.tar.gz survey-a47bf3dd04d182638fedf0f6edb99b73fc1efd3e.tar.bz2 survey-a47bf3dd04d182638fedf0f6edb99b73fc1efd3e.zip |
testing /pick
Diffstat (limited to 'talersurvey')
-rw-r--r-- | talersurvey/tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/talersurvey/tests.py b/talersurvey/tests.py index f244ae7..4f4e4e2 100644 --- a/talersurvey/tests.py +++ b/talersurvey/tests.py @@ -34,5 +34,18 @@ class SurveyTestCase(unittest.TestCase): "instance": "default", "justification": "Payment methods survey"}) + @patch("requests.post") + def test_pick(self, mocked_post): + ret_post = MagicMock() + ret_post.status_code = 200 + ret_post.json.return_value = {} + mocked_post.return_value = ret_post + self.app.post("/pick?tip_id=44", + data="{}", + content_type="application/json") + mocked_post.assert_called_with( + "http://backend.test.taler.net/tip-pickup", + json={"tip_id": "44"}) + if __name__ == "__main__": unittest.main() |