File tree Expand file tree Collapse file tree 2 files changed +14
-7
lines changed
Expand file tree Collapse file tree 2 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -126,9 +126,16 @@ def _get_deployed_project_name(self):
126126 return os .getenv ("API_USER" )
127127
128128 def _get_repo_name (self ) -> str :
129- """Get the repository name from the git remote URL."""
130- origin_url = self ._get_origin_url ()
131- return Path (origin_url ).stem
129+ """Get the repository name from the git remote URL.
130+
131+ Falls back to the project root directory name if no remote is configured.
132+ """
133+ try :
134+ origin_url = self ._get_origin_url ()
135+ return Path (origin_url ).stem
136+ except Exception :
137+ # No remote configured, use project directory name
138+ return dsd_config .project_root .name
132139
133140 def _prep_automate_all (self ):
134141 """Take any further actions needed if using automate_all."""
Original file line number Diff line number Diff line change 66
77import pytest
88
9-
109# --- Fixtures ---
1110
1211
@@ -74,11 +73,12 @@ def test_setup_script_creates_env_file(setup_script_result):
7473 assert env_file .exists ()
7574
7675 env_content = env_file .read_text ()
77- assert "ON_PYTHONANYWHERE=true" in env_content
78- assert "DJANGO_SECRET_KEY=" in env_content
76+ assert "DEBUG=TRUE" in env_content
77+ assert "ON_PYTHONANYWHERE=TRUE" in env_content
78+ assert "SECRET_KEY=" in env_content
7979
8080 # Verify secret key is not empty
8181 for line in env_content .splitlines ():
82- if line .startswith ("DJANGO_SECRET_KEY =" ):
82+ if line .startswith ("SECRET_KEY =" ):
8383 secret_key = line .split ("=" , 1 )[1 ]
8484 assert len (secret_key ) == 50
You can’t perform that action at this time.
0 commit comments