File tree Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Expand file tree Collapse file tree 3 files changed +34
-1
lines changed Original file line number Diff line number Diff line change 9
9
10
10
migrate :
11
11
cd intbot && DJANGO_ENV=" dev" uv run ./manage.py migrate
12
+
13
+ test :
14
+ cd intbot && DJANGO_SETTINGS_MODULE=" intbot.settings" DJANGO_ENV=" test" uv run pytest
Original file line number Diff line number Diff line change 118
118
}
119
119
120
120
elif DJANGO_ENV == "test" :
121
- ...
121
+ DEBUG = True
122
+ ALLOWED_HOSTS = ["127.0.0.1" , "localhost" ]
123
+
124
+ SECRET_KEY = "django-insecure-secret"
125
+
126
+ DATABASES = {
127
+ "default" : {
128
+ "ENGINE" : "django.db.backends.postgresql" ,
129
+ "NAME" : "intbot_database_dev" ,
130
+ "USER" : "intbot_user" ,
131
+ "PASSWORD" : "intbot_password" ,
132
+ "HOST" : "localhost" ,
133
+ "PORT" : "14672" ,
134
+ }
135
+ }
122
136
123
137
124
138
else :
Original file line number Diff line number Diff line change
1
+ """
2
+ This file is currently used to test the test harness.
3
+
4
+ It checks whether the tests are running, can access databse, etc
5
+ """
6
+
7
+ from django .contrib .auth .models import User
8
+ import pytest
9
+
10
+
11
+ @pytest .mark .django_db
12
+ def test_database_sanity_check ():
13
+ u = User .objects .create (username = "Poirot" )
14
+
15
+ assert u .id
16
+ assert u .username == "Poirot"
You can’t perform that action at this time.
0 commit comments