Add a test fixture which creates a user for testing the CFP
Also add a single proposal which can be reviewed.
This commit is contained in:
parent
00ddfc00b8
commit
fa5885a766
3 changed files with 196 additions and 2 deletions
|
@ -9,5 +9,6 @@ if [ -e /configs/auth/auth.json ]; then
|
||||||
elif [ $DATABASE_URL == "sqlite:////tmp/symposion.sqlite" ]; then
|
elif [ $DATABASE_URL == "sqlite:////tmp/symposion.sqlite" ]; then
|
||||||
/usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/admin_users.json
|
/usr/local/bin/python /app/symposion_app/manage.py loaddata /app/symposion_app/fixtures/admin_users.json
|
||||||
fi
|
fi
|
||||||
|
/usr/local/bin/python /app/symposion_app/manage.py loaddata -v3 /app/symposion_app/fixtures/cfp_teams_test.json
|
||||||
|
|
||||||
exec /usr/local/bin/uwsgi --http-socket 0.0.0.0:8000 --wsgi-file pinaxcon/wsgi.py
|
exec /usr/local/bin/uwsgi --http-socket 0.0.0.0:8000 --wsgi-file pinaxcon/wsgi.py
|
||||||
|
|
191
fixtures/cfp_teams_test.json
Normal file
191
fixtures/cfp_teams_test.json
Normal file
|
@ -0,0 +1,191 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"model": "auth.user",
|
||||||
|
"pk": 9001,
|
||||||
|
"fields": {
|
||||||
|
"password": "pbkdf2_sha256$36000$XZeHERCW7hl3$eIcr49yuebUb5o5JSwB1AHQc1Tdz+bqw8Tcmy7PxFkA=",
|
||||||
|
"last_login": null,
|
||||||
|
"is_superuser": false,
|
||||||
|
"username": "cfp_speaker",
|
||||||
|
"first_name": "cfp",
|
||||||
|
"last_name": "speaker",
|
||||||
|
"email": "speaker@lca2019.org",
|
||||||
|
"is_staff": false,
|
||||||
|
"is_active": true,
|
||||||
|
"date_joined": "2018-06-27T06:31:21.863Z",
|
||||||
|
"groups": [],
|
||||||
|
"user_permissions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "auth.user",
|
||||||
|
"pk": 9000,
|
||||||
|
"fields": {
|
||||||
|
"password": "pbkdf2_sha256$36000$9EwpJEV9yASD$SZquWdAt+g8k+lseqiVkO304hXKBgtL6uwuPhkF+Wn4=",
|
||||||
|
"last_login": null,
|
||||||
|
"is_superuser": false,
|
||||||
|
"username": "cfp_reviewer",
|
||||||
|
"first_name": "",
|
||||||
|
"last_name": "",
|
||||||
|
"email": "",
|
||||||
|
"is_staff": false,
|
||||||
|
"is_active": true,
|
||||||
|
"date_joined": "2018-06-27T06:31:21.863Z",
|
||||||
|
"groups": [],
|
||||||
|
"user_permissions": []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "teams.team",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"slug": "cfp-review",
|
||||||
|
"name": "cfp review",
|
||||||
|
"description": "",
|
||||||
|
"access": "open",
|
||||||
|
"created": "2018-06-27T06:41:16.800Z",
|
||||||
|
"permissions": [
|
||||||
|
[
|
||||||
|
"can_review_main",
|
||||||
|
"reviews",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"can_review_miniconf",
|
||||||
|
"reviews",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
],
|
||||||
|
"manager_permissions": [
|
||||||
|
[
|
||||||
|
"can_manage_main",
|
||||||
|
"reviews",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"can_manage_miniconf",
|
||||||
|
"reviews",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"can_review_main",
|
||||||
|
"reviews",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
[
|
||||||
|
"can_review_miniconf",
|
||||||
|
"reviews",
|
||||||
|
""
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "teams.membership",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"user": [
|
||||||
|
"cfp_reviewer"
|
||||||
|
],
|
||||||
|
"team": 1,
|
||||||
|
"state": "member",
|
||||||
|
"message": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_speakers.speaker",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"user": [
|
||||||
|
"cfp_speaker"
|
||||||
|
],
|
||||||
|
"name": "A Speaker of Things",
|
||||||
|
"biography": "An interesting admin",
|
||||||
|
"biography_html": "",
|
||||||
|
"experience": "Lots and lots",
|
||||||
|
"experience_html": "",
|
||||||
|
"photo": "",
|
||||||
|
"telephone": "NONE",
|
||||||
|
"homepage": "",
|
||||||
|
"twitter_username": "",
|
||||||
|
"accessibility": "",
|
||||||
|
"accessibility_html": "",
|
||||||
|
"travel_assistance": false,
|
||||||
|
"accommodation_assistance": false,
|
||||||
|
"agreement": false,
|
||||||
|
"annotation": "annotation",
|
||||||
|
"invite_email": "admin1@example.com",
|
||||||
|
"invite_token": "token",
|
||||||
|
"created": "2018-06-27T07:55:35.175Z"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_proposals.proposalsection",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"section": 1,
|
||||||
|
"start": "2018-05-30T00:00:00Z",
|
||||||
|
"end": "2018-07-30T12:00:00Z",
|
||||||
|
"closed": false,
|
||||||
|
"published": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_proposals.proposalsection",
|
||||||
|
"pk": 2,
|
||||||
|
"fields": {
|
||||||
|
"section": 2,
|
||||||
|
"start": "2018-05-30T00:00:00Z",
|
||||||
|
"end": "2018-07-30T12:00:00Z",
|
||||||
|
"closed": false,
|
||||||
|
"published": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_proposals.proposalkind",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"section": 1,
|
||||||
|
"name": "Talk",
|
||||||
|
"slug": "talk"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_proposals.proposalkind",
|
||||||
|
"pk": 2,
|
||||||
|
"fields": {
|
||||||
|
"section": 1,
|
||||||
|
"name": "Tutorial",
|
||||||
|
"slug": "tutorial"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_proposals.proposalkind",
|
||||||
|
"pk": 3,
|
||||||
|
"fields": {
|
||||||
|
"section": 2,
|
||||||
|
"name": "Miniconf",
|
||||||
|
"slug": "miniconf"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"model": "symposion_proposals.proposalbase",
|
||||||
|
"pk": 1,
|
||||||
|
"fields": {
|
||||||
|
"kind": 1,
|
||||||
|
"title": "asdfasdf",
|
||||||
|
"abstract": "asdfasdf",
|
||||||
|
"abstract_html": "asdfasdf",
|
||||||
|
"private_abstract": "asdfasdf",
|
||||||
|
"private_abstract_html": "asdfasdf",
|
||||||
|
"technical_requirements": "",
|
||||||
|
"technical_requirements_html": "",
|
||||||
|
"project": "",
|
||||||
|
"project_url": "",
|
||||||
|
"video_url": "",
|
||||||
|
"submitted": "2018-06-27T06:31:56.956Z",
|
||||||
|
"speaker": 1,
|
||||||
|
"cancelled": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -22,18 +22,20 @@ docker exec symposion ./manage.py loaddata ./fixtures/{conference,sites,sitetree
|
||||||
docker exec symposion ./manage.py create_review_permissions
|
docker exec symposion ./manage.py create_review_permissions
|
||||||
#docker exec symposion ./manage.py populate_inventory
|
#docker exec symposion ./manage.py populate_inventory
|
||||||
#docker exec symposion ./manage.py loaddata ./fixtures/miniconf-fixtures/*.json
|
#docker exec symposion ./manage.py loaddata ./fixtures/miniconf-fixtures/*.json
|
||||||
|
|
||||||
if [ -e ./symposion-tools ]; then
|
if [ -e ./symposion-tools ]; then
|
||||||
pushd ./symposion-tools
|
pushd ./symposion-tools
|
||||||
./fixture_to_docker.sh fixtures/dev_dummy_superuser.json
|
./fixture_to_docker.sh fixtures/dev_dummy_superuser.json
|
||||||
./fixture_to_docker.sh fixtures/????_*.json
|
./fixture_to_docker.sh fixtures/????_*.json
|
||||||
popd
|
popd
|
||||||
else
|
else
|
||||||
docker exec -it symposion ./manage.py createsuperuser --username root --email root@example.com
|
docker exec -it symposion ./manage.py createsuperuser --username admin1 --email root@example.com
|
||||||
fi
|
fi
|
||||||
|
docker exec symposion ./manage.py loaddata -v3 ./fixtures/cfp_teams_test.json
|
||||||
|
|
||||||
set +x
|
set +x
|
||||||
echo "Now you can log into http://localhost:28000/admin"
|
echo "Now you can log into http://localhost:28000/admin"
|
||||||
echo "Username: root Password: the one you just typed twice"
|
echo "Username: admin1 Password: the one you just typed twice"
|
||||||
echo "If you need to test as a non-admin user, create one at"
|
echo "If you need to test as a non-admin user, create one at"
|
||||||
echo "http://localhost:28000/admin/auth/user/add/ - then log out"
|
echo "http://localhost:28000/admin/auth/user/add/ - then log out"
|
||||||
echo "and log back in at http://localhost:28000"
|
echo "and log back in at http://localhost:28000"
|
||||||
|
|
Loading…
Reference in a new issue