mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Override default URL behaviour for unit test
This commit is contained in:
parent
53333c29c3
commit
2c12a69529
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user