diff options
author | 2018-05-20 23:29:17 +0100 | |
---|---|---|
committer | 2018-05-20 23:29:17 +0100 | |
commit | 449d52caf4010ed112f1928bf6b5234bcfb9a339 (patch) | |
tree | 3ce59258a68fcb4174610b157f3a3ae9c50be02a /tests | |
parent | Tests directory (#73) (diff) |
Privacy/Usability updates (#75)
* Use less intrusive oauth scopes, add login redirect method
* Remove debugging prints, add missing __init__
* Work towards new privacy policy
* Fix judging state icons on code jam management page
* Jammer profile retraction and punishments based on jam status
* Linting
* [Jams] Deny profile saving for users < 13 years, and finish removal page
* Fix tests
* Clean up and address Volcyy's review
* Add proper login redirection to require_roles decorator
* Fix template is_staff() and add staff link to navigation
* Address lemon's review
* Linting
* Privacy page formatting
* Privacy page formatting
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_mixins.py | 4 | ||||
-rw-r--r-- | tests/test_oauth_backend.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_mixins.py b/tests/test_mixins.py index 58118ae0..27e61b22 100644 --- a/tests/test_mixins.py +++ b/tests/test_mixins.py @@ -27,7 +27,7 @@ class MixinTests(SiteTest): from flask import Blueprint from pysite.route_manager import RouteView - from pysite.oauth import OauthBackend + from pysite.oauth import OAuthBackend class TestRoute(RouteView): name = "test" @@ -35,7 +35,7 @@ class MixinTests(SiteTest): tr = TestRoute() tr.setup(manager, Blueprint("test", "test_name")) - self.assertIsInstance(tr.oauth, OauthBackend) + self.assertIsInstance(tr.oauth, OAuthBackend) def test_user_data_property(self): """ Make sure the user_data property works""" diff --git a/tests/test_oauth_backend.py b/tests/test_oauth_backend.py index 58e40c25..473f5c54 100644 --- a/tests/test_oauth_backend.py +++ b/tests/test_oauth_backend.py @@ -1,6 +1,6 @@ from tests import SiteTest, manager -class TestOauthBackend(SiteTest): +class TestOAuthBackend(SiteTest): """ Test cases for the oauth.py file """ def test_get(self): @@ -23,7 +23,7 @@ class TestOauthBackend(SiteTest): sess_id = "hey bro wazup" fake_token = {"access_token": "access_token", "id": sess_id, "refresh_token": "refresh_token", "expires_at": 5} - fake_user = {"id": 1235678987654321, "username": "Zwacky", "discriminator": "#6660", "email": "[email protected]"} + fake_user = {"id": 1235678987654321, "username": "Zwacky", "discriminator": "#6660"} manager.db.conn = manager.db.get_connection() manager.oauth_backend.add_user(fake_token, fake_user, sess_id) |