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
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
Felix Blanke
AKPlanning
Merge requests
!11
Add tests on json export
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Merged
Add tests on json export
feature/json-export-tests
into
main
Overview
1
Commits
39
Pipelines
14
Changes
1
Merged
Add tests on json export
Felix Blanke
requested to merge
feature/json-export-tests
into
main
9 months ago
Overview
1
Commits
39
Pipelines
14
Changes
1
0
0
Merge request reports
Viewing commit
bbf8a414
Prev
Next
Show latest version
1 file
+
21
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
bbf8a414
Test fulfilled room constr
· bbf8a414
Felix Blanke
authored
9 months ago
AKModel/tests.py
+
21
−
0
View file @ bbf8a414
Edit in single-file editor
Open in Web IDE
Show full file
@@ -718,3 +718,24 @@ class JSONExportTest(TestCase):
export_room
=
self
.
export_rooms
[
str
(
room
.
pk
)]
self
.
assertEqual
(
time_constraints
,
set
(
export_room
[
"
time_constraints
"
]))
def
test_room_fulfilledroomconstraints
(
self
):
for
room
in
self
.
rooms
:
# room properties
fulfilled_room_constraints
=
set
(
room
.
properties
.
values_list
(
"
name
"
,
flat
=
True
)
)
# proxy rooms
if
not
any
(
constr
.
startswith
(
"
proxy
"
)
for
constr
in
fulfilled_room_constraints
):
fulfilled_room_constraints
.
add
(
"
no-proxy
"
)
fulfilled_room_constraints
.
add
(
f
"
availability-room-
{
room
.
pk
}
"
)
export_room
=
self
.
export_rooms
[
str
(
room
.
pk
)]
self
.
assertEqual
(
fulfilled_room_constraints
,
set
(
export_room
[
"
fulfilled_room_constraints
"
]),
)
Loading