Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
network
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Code
Merge requests
9
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
Service Desk
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
funkwhale
network
Commits
e419e32b
Verified
Commit
e419e32b
authored
2 years ago
by
Georg Krause
Browse files
Options
Downloads
Patches
Plain Diff
Fix tests
parent
ea0f781e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#26404
failed with stages
Stage: test
Stage: build
in 1 minute and 48 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tests/test_routes.py
+2
-2
2 additions, 2 deletions
tests/test_routes.py
tests/test_serializers.py
+3
-3
3 additions, 3 deletions
tests/test_serializers.py
with
5 additions
and
5 deletions
tests/test_routes.py
+
2
−
2
View file @
e419e32b
...
...
@@ -115,7 +115,7 @@ async def test_domains_stats(client, mocker, coroutine_mock):
assert
await
resp
.
json
()
==
payload
async
def
test_domains_rss
(
db_conn
,
factories
,
client
,
mocker
):
async
def
test_domains_rss
(
factories
,
client
):
blocked
=
await
factories
[
"
Domain
"
].
c
(
blocked
=
True
)
await
factories
[
"
Check
"
].
c
(
private
=
False
,
domain
=
blocked
[
"
name
"
])
...
...
@@ -124,7 +124,7 @@ async def test_domains_rss(db_conn, factories, client, mocker):
await
factories
[
"
Check
"
].
c
(),
await
factories
[
"
Check
"
].
c
(),
expected
=
serializers
.
serialize_rss_feed_from_checks
(
await
db
.
get_domains
(
db_conn
,
**
{})
await
db
.
get_domains
(
**
{})
)
resp
=
await
client
.
get
(
"
/api/domains
"
,
params
=
{
"
format
"
:
"
rss
"
})
assert
resp
.
status
==
200
...
...
This diff is collapsed.
Click to expand it.
tests/test_serializers.py
+
3
−
3
View file @
e419e32b
...
...
@@ -3,9 +3,9 @@ import datetime
from
funkwhale_network
import
serializers
async
def
test_create_domain_ignore_duplicate
(
populated_db
,
db_conn
):
r1
=
await
serializers
.
create_domain
(
db_conn
,
{
"
name
"
:
"
test.domain
"
})
r2
=
await
serializers
.
create_domain
(
db_conn
,
{
"
name
"
:
"
test.domain
"
})
async
def
test_create_domain_ignore_duplicate
(
populated_db
):
r1
=
await
serializers
.
create_domain
({
"
name
"
:
"
test.domain
"
})
r2
=
await
serializers
.
create_domain
({
"
name
"
:
"
test.domain
"
})
assert
r1
!=
r2
assert
r2
is
None
...
...
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