From daf9ec790a14e556049df36904ebc86c45f85b7b Mon Sep 17 00:00:00 2001 From: jackwardell Date: Tue, 28 Jul 2020 14:23:00 +0100 Subject: [PATCH] swapping self.assert_equal for assert self.assert_equal is not in a class and is ambiguous. Beginners might copy and paste this example and not understand it. --- docs/testing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/testing.rst b/docs/testing.rst index bd6b1933..1ac4fcca 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -312,7 +312,7 @@ And then to use it:: with app.test_client() as c: resp = c.get('/users/me') data = json.loads(resp.data) - self.assert_equal(data['username'], my_user.username) + assert data['username'] == my_user.username Keeping the Context Around