Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
steering
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
AURA
steering
Commits
7b814f72
Verified
Commit
7b814f72
authored
3 months ago
by
Ernesto Rico Schmidt
Browse files
Options
Downloads
Patches
Plain Diff
refactor: move cba fixture -> test_reset_state
parent
36eafb93
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
conftest.py
+0
-7
0 additions, 7 deletions
conftest.py
program/tests/test_reset_state.py
+8
-0
8 additions, 0 deletions
program/tests/test_reset_state.py
with
8 additions
and
7 deletions
conftest.py
+
0
−
7
View file @
7b814f72
...
...
@@ -6,7 +6,6 @@ from rest_framework.test import APIClient
from
django.contrib.auth.models
import
User
from
django.core.files.uploadedfile
import
SimpleUploadedFile
from
program.models
import
(
CBA
,
Category
,
FundingCategory
,
Image
,
...
...
@@ -26,7 +25,6 @@ from program.models import (
)
from
program.tests.factories
import
(
CategoryFactory
,
CBAFactory
,
CommonUserFactory
,
FundingCategoryFactory
,
ImageFactory
,
...
...
@@ -195,11 +193,6 @@ def radio_settings(fallback_show) -> RadioSettings:
)
@pytest.fixture
def
cba
(
common_user1
)
->
CBA
:
return
CBAFactory
(
user
=
common_user1
)
@pytest.fixture
def
owned_show
(
common_user1
,
show
)
->
Show
:
"""
Show owned by a common user
"""
...
...
This diff is collapsed.
Click to expand it.
program/tests/test_reset_state.py
+
8
−
0
View file @
7b814f72
import
pytest
from
program.models
import
CBA
from
program.tests.factories
import
CBAFactory
pytestmark
=
pytest
.
mark
.
django_db
...
...
@@ -16,6 +19,11 @@ def assert_value(response, key: str, value: int) -> None:
assert
response
.
data
[
key
]
==
value
@pytest.fixture
def
cba
(
common_user1
)
->
CBA
:
return
CBAFactory
(
user
=
common_user1
)
def
test_reset_auth
(
admin_api_client
,
common_user1
,
cba
):
response
=
admin_api_client
.
delete
(
url
(
model_categories
=
"
auth
"
))
...
...
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