Coverage for tests/admin/admin_endpoint_testing.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from unittest import TestCase
3from webapp.app import create_app
4from webapp.authentication import get_publishergw_authorization_header
7class TestAdminEndpoints(TestCase):
8 def _log_in(self, client):
9 test_macaroon = "test_macaroon"
10 with client.session_transaction() as s:
11 s["publisher"] = {
12 "account_id": "test_account_id",
13 "image": None,
14 "nickname": "XYZ",
15 "fullname": "ABC XYZ",
16 "email": "testing@testing.com",
17 "stores": [],
18 }
19 s["macaroons"] = "test_macaroon"
20 s["developer_token"] = test_macaroon
21 s["exchanged_developer_token"] = True
23 return get_publishergw_authorization_header(test_macaroon)
25 def setUp(self):
26 self.app = create_app(testing=True)
27 self.client = self.app.test_client()
28 self._log_in(self.client)