Skip to content

Commit

Permalink
fix GH test that needed live server
Browse files Browse the repository at this point in the history
  • Loading branch information
DinisCruz committed Jan 28, 2025
1 parent 3d6e399 commit 8a30eab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions mgraph_ai/providers/json/actions/MGraph__Json__Screenshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from mgraph_ai.providers.json.domain.Domain__MGraph__Json__Graph import Domain__MGraph__Json__Graph
from osbot_utils.utils.Files import file_create_from_bytes
from osbot_utils.utils.Http import url_join_safe
from osbot_utils.utils.Env import get_env
from osbot_utils.utils.Env import get_env, not_in_github_action

from osbot_utils.type_safe.Type_Safe import Type_Safe

Expand Down Expand Up @@ -74,5 +74,7 @@ def url__render_method(self, path):
return url_join_safe(self.url__render_server(), path)

def url__render_server(self):
url = get_env(ENV_NAME__URL__MGRAPH_AI_SERVERLESS, DEFAULT__URL__LOCAL__MGRAPH_AI_API)
url = get_env(ENV_NAME__URL__MGRAPH_AI_SERVERLESS)
if url is None and not_in_github_action():
url = DEFAULT__URL__LOCAL__MGRAPH_AI_API
return url
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class test_MGraph__Json__Screenshot(TestCase):

@classmethod
def setUpClass(cls):
load_dotenv()
cls.test_data = {"aa": "bb", "cc": ["dd", "ee"], "an_list": [1, 2, 3, 4]}
cls.target_file = '/tmp/json-screenshot.png'
cls.delete_on_exit = False
Expand Down

0 comments on commit 8a30eab

Please sign in to comment.