Skip to content

Commit e8ed31b

Browse files
committed
test: rename test apps
Having the Django and Flask apps both use the module name "app" makes the tests order-dependent. If the Django "app" is loaded before the Flask tests, the latter fail because they try to import "app.main", which doesn't exist Maybe there's some other way to avoid this collision by unloading "app" and still have all the tests pass, but I couldn't find it. Just renaming them seemed simplest.
1 parent ac88299 commit e8ed31b

File tree

15 files changed

+21
-21
lines changed

15 files changed

+21
-21
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
name: test_app
22
packages:
3-
- path: app
3+
- path: djangoapp
44

_appmap/test/data/django/app/__init__.py renamed to _appmap/test/data/django/djangoapp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
django.conf.settings.configure(
77
DATABASES={"default": {"ENGINE": "django.db.backends.sqlite3", "NAME": ":memory:"}},
88
MIDDLEWARE=["django.middleware.http.ConditionalGetMiddleware"],
9-
ROOT_URLCONF="app.urls",
9+
ROOT_URLCONF="djangoapp.urls",
1010
TEMPLATES=[
1111
{
1212
"BACKEND": "django.template.backends.django.DjangoTemplates",

_appmap/test/data/django/app/settings.py renamed to _appmap/test/data/django/djangoapp/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
ALLOWED_HOSTS = ["*"]
77
# Must set ROOT_URLCONF else we get
88
# AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF'
9-
ROOT_URLCONF = "app.urls"
9+
ROOT_URLCONF = "djangoapp.urls"
1010

1111
# Turn off deprecation warning
1212
USE_TZ = True

_appmap/test/data/django/app/settings_dev.py renamed to _appmap/test/data/django/djangoapp/settings_dev.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
# Must set ROOT_URLCONF else we get
1111
# AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF'
12-
ROOT_URLCONF = "app.urls"
12+
ROOT_URLCONF = "djangoapp.urls"
1313

1414
# Turn off deprecation warning
1515
USE_TZ = True
File renamed without changes.

_appmap/test/data/django/manage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def main():
88
"""Run administrative tasks."""
9-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings")
9+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoapp.settings")
1010
try:
1111
from django.core.management import execute_from_command_line
1212
except ImportError as exc:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[pytest]
2-
DJANGO_SETTINGS_MODULE = app.settings
2+
DJANGO_SETTINGS_MODULE = djangoapp.settings

0 commit comments

Comments
 (0)