Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
greg
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
it-bott-integrasjoner
greg
Commits
e882e359
Commit
e882e359
authored
3 years ago
by
Deaktivert bruker
Browse files
Options
Downloads
Patches
Plain Diff
greg.tests: drop assignment to unused variables
As reported by pylint. Fixes: GREG-16
parent
e5bf9674
No related branches found
No related tags found
1 merge request
!8
build: introduce pylint, pyproject.toml, and formatting lints
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
greg/tests/test_api_person.py
+2
-2
2 additions, 2 deletions
greg/tests/test_api_person.py
with
2 additions
and
2 deletions
greg/tests/test_api_person.py
+
2
−
2
View file @
e882e359
...
@@ -15,8 +15,8 @@ class GregAPITestCase(APITestCase):
...
@@ -15,8 +15,8 @@ class GregAPITestCase(APITestCase):
self
.
client
=
self
.
get_token_client
()
self
.
client
=
self
.
get_token_client
()
def
get_token_client
(
self
,
username
=
"
test
"
)
->
APIClient
:
def
get_token_client
(
self
,
username
=
"
test
"
)
->
APIClient
:
self
.
user
,
created
=
get_user_model
().
objects
.
get_or_create
(
username
=
username
)
self
.
user
,
_
=
get_user_model
().
objects
.
get_or_create
(
username
=
username
)
token
,
created
=
Token
.
objects
.
get_or_create
(
user
=
self
.
user
)
token
,
_
=
Token
.
objects
.
get_or_create
(
user
=
self
.
user
)
client
=
APIClient
()
client
=
APIClient
()
client
.
credentials
(
HTTP_AUTHORIZATION
=
"
Token {}
"
.
format
(
token
.
key
))
client
.
credentials
(
HTTP_AUTHORIZATION
=
"
Token {}
"
.
format
(
token
.
key
))
return
client
return
client
...
...
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