Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
b5e6607b
Commit
b5e6607b
authored
Jul 27, 2015
by
Christine Lytwynec
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9005 from edx/clytwynec/mark-test_import_timestamp-as-flaky
mark test_import_timestamp as flaky
parents
ce9d2439
802725a5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
common/test/acceptance/tests/studio/test_import_export.py
+12
-0
No files found.
common/test/acceptance/tests/studio/test_import_export.py
View file @
b5e6607b
...
...
@@ -4,6 +4,7 @@ Acceptance tests for the Import and Export pages
from
abc
import
abstractmethod
from
bok_choy.promise
import
EmptyPromise
from
datetime
import
datetime
from
flaky
import
flaky
from
.base_studio_test
import
StudioLibraryTest
,
StudioCourseTest
from
...fixtures.course
import
XBlockFixtureDesc
...
...
@@ -185,6 +186,7 @@ class ImportTestMixin(object):
self
.
import_page
.
upload_tarball
(
self
.
tarball_name
)
self
.
import_page
.
wait_for_upload
()
@flaky
# TODO make this not flaky. See TNL-2886.
def
test_import_timestamp
(
self
):
"""
Scenario: I perform a course / library import
...
...
@@ -199,6 +201,16 @@ class ImportTestMixin(object):
import_date
,
import_time
=
self
.
import_page
.
timestamp
self
.
import_page
.
wait_for_timestamp_visible
()
# Flaky pattern:
# This test failed because the utc_now and import date
# might be assigned at different times. The error message
# was "'18:30' != u'18:29'", meaning it uploaded it at 18:29, then,
# when we assigned utc_now, the time had crossed the minute to
# 18:30.
# Possible fixes:
# * Mock utcnow somehow.
# * Check for the date and time within a certain range, rather than
# doing a string comparison.
self
.
assertEqual
(
utc_now
.
strftime
(
'
%
m/
%
d/
%
Y'
),
import_date
)
self
.
assertEqual
(
utc_now
.
strftime
(
'
%
H:
%
M'
),
import_time
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment