def test_put_with_update(self): responses.add(responses.GET, example_url, body='{"_rev": "1-asf"}') responses.add(responses.PUT, example_url, body='{"ok": "true"}', status=200) server._put(example_url, update=True, expected_response=200) self.assertIn("_rev", responses.calls[0].response.text)
def test_put_with_no_update(self): responses.add(responses.PUT, example_url, body='{"ok": "true"}', status=200) self.assertEqual(server._put(example_url, expected_response=200), {"ok": "true"})