Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pirates
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
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
TO
pirates
Commits
bd19f62f
Commit
bd19f62f
authored
4 years ago
by
jan.bednarik
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests setup
parent
fa2e4643
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
pirates/urls.py
+0
-0
0 additions, 0 deletions
pirates/urls.py
setup.cfg
+1
-1
1 addition, 1 deletion
setup.cfg
tests/conftest.py
+6
-0
6 additions, 0 deletions
tests/conftest.py
tests/factories.py
+1
-3
1 addition, 3 deletions
tests/factories.py
tests/settings.py
+4
-1
4 additions, 1 deletion
tests/settings.py
with
12 additions
and
5 deletions
pirates/urls.py
0 → 100644
+
0
−
0
View file @
bd19f62f
This diff is collapsed.
Click to expand it.
setup.cfg
+
1
−
1
View file @
bd19f62f
...
@@ -12,4 +12,4 @@ line_length = 88
...
@@ -12,4 +12,4 @@ line_length = 88
multi_line_output
=
3
multi_line_output
=
3
default_sectiont
=
"THIRDPARTY"
default_sectiont
=
"THIRDPARTY"
include_trailing_comma
=
true
include_trailing_comma
=
true
known_third_party
=
django,factory,faker,mozilla_django_oidc,pytest,setuptools
known_third_party
=
django,factory,faker,mozilla_django_oidc,pytest,
pytest_factoryboy,
setuptools
This diff is collapsed.
Click to expand it.
tests/conftest.py
0 → 100644
+
6
−
0
View file @
bd19f62f
from
pytest_factoryboy
import
register
from
.factories
import
TeamFactory
,
UserFactory
register
(
UserFactory
)
register
(
TeamFactory
)
This diff is collapsed.
Click to expand it.
tests/factories.py
+
1
−
3
View file @
bd19f62f
from
typing
import
Any
,
Sequence
from
django.contrib.auth
import
get_user_model
from
django.contrib.auth
import
get_user_model
from
factory
import
DjangoModelFactory
,
Faker
,
post_generation
from
factory
import
DjangoModelFactory
,
Faker
,
post_generation
...
@@ -11,7 +9,7 @@ class UserFactory(DjangoModelFactory):
...
@@ -11,7 +9,7 @@ class UserFactory(DjangoModelFactory):
email
=
Faker
(
"
email
"
)
email
=
Faker
(
"
email
"
)
@post_generation
@post_generation
def
password
(
self
,
create
:
bool
,
extracted
:
Sequence
[
Any
]
,
**
kwargs
):
def
password
(
self
,
create
,
extracted
,
**
kwargs
):
password
=
Faker
(
password
=
Faker
(
"
password
"
,
"
password
"
,
length
=
42
,
length
=
42
,
...
...
This diff is collapsed.
Click to expand it.
tests/settings.py
+
4
−
1
View file @
bd19f62f
...
@@ -23,4 +23,7 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cache"
...
@@ -23,4 +23,7 @@ SESSION_ENGINE = "django.contrib.sessions.backends.cache"
MIDDLEWARE
=
[]
MIDDLEWARE
=
[]
OIDC_USERNAME_ALGO
=
None
OIDC_RP_CLIENT_ID
=
""
OIDC_RP_CLIENT_SECRET
=
""
OIDC_OP_TOKEN_ENDPOINT
=
""
OIDC_OP_USER_ENDPOINT
=
""
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