This repository was archived by the owner on Oct 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +43
-4
lines changed
Expand file tree Collapse file tree 4 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ TIME_ZONE='Europe/London'
66APP_ENV = testing
77SIGNING_KEY = 2de5c7b55db0e2bcbaac7a135e7b0cf340da8dba93f8c6d4f5ef0934887c834b
88MARIADB_DATABASE = boilerplate
9- MARIADB_USER = root
10- MARIADB_PASSWORD =
9+ MARIADB_USER = user
10+ MARIADB_PASSWORD = secret
1111MARIADB_HOST = localhost
1212MARIADB_PORT = 3306
1313EMAIL_HOST = mailhog
Original file line number Diff line number Diff line change 5555 run : sed -i "s/3306/${{ job.services.mysql.ports['3306'] }}/g" .env.testing
5656 - name : Create environment file
5757 run : cp .env.testing .env
58- - name : Run Tests
58+ - name : Create database tables
5959 run : |
60- python ${{ env.django_test_args }} manage.py test
60+ # mkdir mynewapp/migrations
61+ # touch mynewapp/migrations/__init__.py
62+ # python manage.py makemigrations
63+ python manage.py migrate
64+ - name : Create super user
65+ run : python manage.py loaddata app/fixtures/auth_user
66+ - name : Run Tests
67+ run : python ${{ env.django_test_args }} manage.py test
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "model" : " auth.user" ,
4+ "pk" : 1 ,
5+ "fields" : {
6+ "password" : " pbkdf2_sha256$320000$qJzyiNcYZBbXcJyFqwaCjG$3M3xtHf+9SR4pAZ9zT7xPCvxB3vBEjERpDzrS4OSxjg=" ,
7+ "last_login" : null ,
8+ "is_superuser" : true ,
9+ "username" : " admin_user" ,
10+ "first_name" : " " ,
11+ "last_name" : " " ,
12+ "email" : " admin@django-app.com" ,
13+ "is_staff" : true ,
14+ "is_active" : true ,
15+ "date_joined" : " 2023-08-13T12:19:09.380Z" ,
16+ "groups" : [],
17+ "user_permissions" : []
18+ }
19+ }
20+ ]
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ With docker support.
44
55* [ Installation] ( #installation )
66
7+ * [ Add testing seed data] ( #add-testing-seed-data )
8+
79* [ Usage] ( #usage )
810
911* [ Using Docker] ( #using-docker )
@@ -33,6 +35,16 @@ pip install virtualenv && \
3335 source env/bin/activate
3436```
3537
38+ ##### Add testing seed data
39+
40+ Example:
41+
42+ Load data [ auth_user.json] ( https://github.com/kkamara/python-react-boilerplate/blob/main/app/fixtures/auth_user.json ) into database.
43+
44+ ``` bash
45+ python manage.py loaddata app/fixtures/auth_user
46+ ```
47+
3648## Usage
3749
3850``` bash
You can’t perform that action at this time.
0 commit comments