diff options
| author | Tom Christie | 2015-02-09 17:43:20 +0000 |
|---|---|---|
| committer | Tom Christie | 2015-02-09 17:43:20 +0000 |
| commit | b2939c157d32e604e10099be891e382d8c54bbec (patch) | |
| tree | 6b164989c0b659a2d92051c3fbd6625306056ecb /tests/test_authentication.py | |
| parent | 0669f507b3a63114cf429f0662b1781f0e1fa5f8 (diff) | |
| download | django-rest-framework-b2939c157d32e604e10099be891e382d8c54bbec.tar.bz2 | |
Fixes for latest version of pep8
Diffstat (limited to 'tests/test_authentication.py')
| -rw-r--r-- | tests/test_authentication.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test_authentication.py b/tests/test_authentication.py index caabcc21..19fe6043 100644 --- a/tests/test_authentication.py +++ b/tests/test_authentication.py @@ -205,7 +205,10 @@ class TokenAuthTests(TestCase): def test_post_json_makes_one_db_query(self): """Ensure that authenticating a user using a token performs only one DB query""" auth = "Token " + self.key - func_to_test = lambda: self.csrf_client.post('/token/', {'example': 'example'}, format='json', HTTP_AUTHORIZATION=auth) + + def func_to_test(): + return self.csrf_client.post('/token/', {'example': 'example'}, format='json', HTTP_AUTHORIZATION=auth) + self.assertNumQueries(1, func_to_test) def test_post_form_failing_token_auth(self): |
