1 """These tests assume we are running (in a docker container) with
2 arvados_pam configured and a test API server running.
7 # From services/api/test/fixtures/api_client_authorizations.yml
8 # because that file is not available during integration tests:
9 ACTIVE_TOKEN = '3kg6k6lzmp9kj5cpkcoxie963cmvjahbt2fod9zru30k1jqdmi'
10 SPECTATOR_TOKEN = 'zw2f4gwx8hw8cjre7yp6v1zylhrhn3m5gvjq73rtpwhmknrybu'
12 class IntegrationTest(unittest.TestCase):
17 self.assertTrue(self.p.authenticate('active', ACTIVE_TOKEN, service='login'))
19 def test_deny_bad_token(self):
20 self.assertFalse(self.p.authenticate('active', 'thisisaverybadtoken', service='login'))
22 def test_deny_empty_token(self):
23 self.assertFalse(self.p.authenticate('active', '', service='login'))
25 def test_deny_permission(self):
26 self.assertFalse(self.p.authenticate('spectator', SPECTATOR_TOKEN, service='login'))