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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Felix Blanke
AKPlanning
Commits
2b0ee263
Commit
2b0ee263
authored
1 year ago
by
Benjamin Hättasch
Browse files
Options
Downloads
Patches
Plain Diff
Improve AKPlan
Add or complete docstrings Remove code smells (unused variables)
parent
63c18d2e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
AKPlan/tests.py
+12
-3
12 additions, 3 deletions
AKPlan/tests.py
with
12 additions
and
3 deletions
AKPlan/tests.py
+
12
−
3
View file @
2b0ee263
...
...
@@ -4,6 +4,9 @@ from AKModel.tests import BasicViewTests
class
PlanViewTests
(
BasicViewTests
,
TestCase
):
"""
Tests for AKPlan
"""
fixtures
=
[
'
model.json
'
]
APP_NAME
=
'
plan
'
...
...
@@ -15,7 +18,10 @@ class PlanViewTests(BasicViewTests, TestCase):
]
def
test_plan_hidden
(
self
):
view_name_with_prefix
,
url
=
self
.
_name_and_url
((
'
plan_overview
'
,
{
'
event_slug
'
:
'
kif23
'
}))
"""
Test correct handling of plan visibility
"""
_
,
url
=
self
.
_name_and_url
((
'
plan_overview
'
,
{
'
event_slug
'
:
'
kif23
'
}))
self
.
client
.
logout
()
response
=
self
.
client
.
get
(
url
)
...
...
@@ -28,8 +34,11 @@ class PlanViewTests(BasicViewTests, TestCase):
msg_prefix
=
"
Plan is not visible for staff user
"
)
def
test_wall_redirect
(
self
):
view_name_with_prefix
,
url_wall
=
self
.
_name_and_url
((
'
plan_wall
'
,
{
'
event_slug
'
:
'
kif23
'
}))
view_name_with_prefix
,
url_plan
=
self
.
_name_and_url
((
'
plan_overview
'
,
{
'
event_slug
'
:
'
kif23
'
}))
"""
Test: Make sure that user is redirected from wall to overview when plan is hidden
"""
_
,
url_wall
=
self
.
_name_and_url
((
'
plan_wall
'
,
{
'
event_slug
'
:
'
kif23
'
}))
_
,
url_plan
=
self
.
_name_and_url
((
'
plan_overview
'
,
{
'
event_slug
'
:
'
kif23
'
}))
response
=
self
.
client
.
get
(
url_wall
)
self
.
assertRedirects
(
response
,
url_plan
,
...
...
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