From 7a6bc2f7749c10c1d3344ea0196e81ae95b7f0d7 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sun, 21 Jul 2019 11:45:29 +0300 Subject: Add: TokenGetter --- ick2/projectapi_tests.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ick2/projectapi_tests.py') diff --git a/ick2/projectapi_tests.py b/ick2/projectapi_tests.py index f8b3c2a..bdb58d1 100644 --- a/ick2/projectapi_tests.py +++ b/ick2/projectapi_tests.py @@ -20,6 +20,12 @@ import unittest import ick2 +class DummyTokenGetter: + + def get_token(self): + return 'DUMMY.TOKEN' + + class ProjectAPITests(unittest.TestCase): def setUp(self): @@ -29,7 +35,10 @@ class ProjectAPITests(unittest.TestCase): return ick2.ProjectAPI(self.state) def create_pipeline_api(self): - return ick2.PipelineAPI(self.state) + getter = DummyTokenGetter() + api = ick2.PipelineAPI(self.state) + api.set_token_getter(getter) + return api def test_has_not_projects_initially(self): api = self.create_api() -- cgit v1.2.1