예제 #1
0
파일: server_io.py 프로젝트: hanshaze/cbf
 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)
예제 #2
0
파일: server_io.py 프로젝트: hanshaze/cbf
 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"})
예제 #3
0
파일: server_io.py 프로젝트: Sliim/faraday
 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)
예제 #4
0
파일: server_io.py 프로젝트: Sliim/faraday
 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"})