From 2c12a695294c2785e82b7f469f79a7d1a5412e71 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 15 Jul 2022 00:02:35 +1000 Subject: [PATCH] Override default URL behaviour for unit test --- InvenTree/plugin/base/integration/test_mixins.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/InvenTree/plugin/base/integration/test_mixins.py b/InvenTree/plugin/base/integration/test_mixins.py index e210865ec7..13cfb47d79 100644 --- a/InvenTree/plugin/base/integration/test_mixins.py +++ b/InvenTree/plugin/base/integration/test_mixins.py @@ -192,6 +192,11 @@ class APICallMixinTest(BaseMixinDefinition, TestCase): API_URL_SETTING = 'API_URL' API_TOKEN_SETTING = 'API_TOKEN' + @property + def api_url(self): + """Override API URL for this test""" + return "https://api.github.com" + def get_external_url(self, simple: bool = True): """Returns data from the sample endpoint.""" return self.api_call('orgs/inventree', simple_response=simple)