X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/5aa13410812d3fc4b35c039bdc3f0a2edc5185a1..bf99d8859b9b576381cde347bd8abd4544f09d38:/src/api/tests/tests.py?ds=sidebyside diff --git a/src/api/tests/tests.py b/src/api/tests/tests.py index 91e5bbf84..6be34ed6b 100644 --- a/src/api/tests/tests.py +++ b/src/api/tests/tests.py @@ -423,12 +423,13 @@ class AuthorizedTests(ApiTest): {"username": "test", "premium": False}) self.assertEqual( self.signed('/api/epub/grandchild/').status_code, - 401) # Not 403 because Piston. + 403) - with patch('api.handlers.user_is_subscribed', return_value=True): + with patch('api.fields.user_is_subscribed', return_value=True): self.assertEqual( self.signed_json('/api/username/'), {"username": "test", "premium": True}) + with patch('paypal.permissions.user_is_subscribed', return_value=True): with patch('django.core.files.storage.Storage.open', return_value=StringIO("")): self.assertEqual(