testtool's asserts

This commit is contained in:
meejah 2020-06-19 17:16:39 -06:00 committed by Sajith Sasidharan
parent 26d7a3a957
commit 1ce760b237

View File

@ -71,7 +71,7 @@ class FakeWebTest(TestCase):
@inlineCallbacks @inlineCallbacks
def do_test(): def do_test():
resp = yield http_client.put("http://example.com/uri", content) resp = yield http_client.put("http://example.com/uri", content)
self.assertEqual(resp.code, 201) self.assertThat(resp.code, Equals(201))
cap_raw = yield resp.content() cap_raw = yield resp.content()
cap = from_string(cap_raw) cap = from_string(cap_raw)
@ -80,7 +80,7 @@ class FakeWebTest(TestCase):
resp = yield http_client.get( resp = yield http_client.get(
"http://example.com/uri?uri={}".format(cap.to_string()) "http://example.com/uri?uri={}".format(cap.to_string())
) )
self.assertEqual(resp.code, 200) self.assertThat(resp.code, Equals(200))
round_trip_content = yield resp.content() round_trip_content = yield resp.content()