Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-web
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
Package registry
Model registry
Operate
Environments
Terraform modules
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
Pierre-Yves David
swh-web
Commits
f113f3a4
Commit
f113f3a4
authored
11 months ago
by
Antoine Lambert
Browse files
Options
Downloads
Patches
Plain Diff
browse/tests/test_snapshot: Remove dateutil use
It should fix a flaky test on Jenkins.
parent
4128af39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
swh/web/browse/tests/views/test_snapshot.py
+3
-4
3 additions, 4 deletions
swh/web/browse/tests/views/test_snapshot.py
with
3 additions
and
4 deletions
swh/web/browse/tests/views/test_snapshot.py
+
3
−
4
View file @
f113f3a4
# Copyright (C) 2022-202
3
The Software Heritage developers
# Copyright (C) 2022-202
4
The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU Affero General Public License version 3, or any later version
# See top-level LICENSE file for more information
...
...
@@ -7,7 +7,6 @@ import random
import
re
import
string
from
dateutil
import
parser
from
hypothesis
import
given
import
pytest
...
...
@@ -33,7 +32,7 @@ from swh.web.tests.data import random_sha1
from
swh.web.tests.django_asserts
import
assert_contains
,
assert_not_contains
from
swh.web.tests.helpers
import
check_html_get_response
from
swh.web.tests.strategies
import
new_origin
,
new_person
,
new_swh_date
,
visit_dates
from
swh.web.utils
import
reverse
from
swh.web.utils
import
format_utc_iso_date
,
reverse
@pytest.mark.parametrize
(
...
...
@@ -85,7 +84,7 @@ def test_snapshot_browse_with_id_origin_and_timestamp(
resp
=
check_html_get_response
(
client
,
url
,
status_code
=
200
,
template_used
=
"
includes/snapshot-context.html
"
)
requested_time
=
parser
.
parse
(
visit
[
"
date
"
]).
strftime
(
"
%d %B %Y, %H:%M
"
)
requested_time
=
format_utc_iso_date
(
visit
[
"
date
"
]
)
assert_contains
(
resp
,
requested_time
)
assert_contains
(
resp
,
visit
[
"
origin
"
])
...
...
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