Add 1 second delay to workaround MySQL <5.6.4 not storing millisecond time data which is used to determine lastest version of a document.

This commit is contained in:
Roberto Rosario
2015-09-21 04:19:57 -04:00
parent 79823ec531
commit 6ccfaf59f8
2 changed files with 10 additions and 0 deletions

View File

@@ -178,6 +178,10 @@ class DocumentAPITestCase(APITestCase):
file_object=File(file_object),
)
# Artifical delay since MySQL doesn't store microsecond data in
# timestamps. Version timestamp is used to determine which version
# is the latest.
time.sleep(1)
with open(TEST_DOCUMENT_PATH) as file_descriptor:
response = self.client.post(
reverse(