Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AKPlanning
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KIF
AKPlanning
Commits
3148d459
Commit
3148d459
authored
1 month ago
by
Felix Blanke
Browse files
Options
Downloads
Patches
Plain Diff
Adapt tests to post
parent
a82c6093
Branches
Branches containing commit
No related tags found
1 merge request
!285
[Tmp] JSON export filtering
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
AKSolverInterface/tests/test_json_export.py
+12
-1
12 additions, 1 deletion
AKSolverInterface/tests/test_json_export.py
with
12 additions
and
1 deletion
AKSolverInterface/tests/test_json_export.py
+
12
−
1
View file @
3148d459
...
...
@@ -22,6 +22,7 @@ from AKModel.models import (
Room
,
)
from
AKPreference.models
import
AKPreference
,
EventParticipant
from
AKSolverInterface.forms
import
JSONExportControlForm
from
AKSolverInterface.utils
import
construct_schema_validator
...
...
@@ -71,7 +72,17 @@ class JSONExportTest(TestCase):
"""
Set up by retrieving json export and initializing data.
"""
export_url
=
reverse
(
"
admin:ak_json_export
"
,
kwargs
=
{
"
event_slug
"
:
event
.
slug
})
response
=
self
.
client
.
get
(
export_url
)
form
=
JSONExportControlForm
(
event
=
event
)
# TODO: test with values other than default
data
=
{
field_name
:
list
(
map
(
str
,
field
.
prepare_value
(
field
.
initial
)))
for
field_name
,
field
in
form
.
fields
.
items
()
if
field
.
initial
is
not
None
}
response
=
self
.
client
.
post
(
export_url
,
data
=
data
)
self
.
assertEqual
(
response
.
status_code
,
200
,
"
Export not working at all
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment