Ejemplo n.º 1
0
 def test_knows_if_it_is_submitted(self):
     # Setup
     issue_1 = IssueSubmissionFactory.create(journal=self.journal)
     issue_2 = IssueSubmissionFactory.create(journal=self.journal)
     issue_2.submit()
     # Run & check
     assert not issue_1.is_submitted
     assert issue_2.is_submitted
Ejemplo n.º 2
0
 def test_knows_if_it_is_submitted(self):
     # Setup
     issue_1 = IssueSubmissionFactory.create(journal=self.journal)
     issue_2 = IssueSubmissionFactory.create(journal=self.journal)
     issue_2.submit()
     # Run & check
     assert not issue_1.is_submitted
     assert issue_2.is_submitted
Ejemplo n.º 3
0
 def test_can_remove_incomplete_files_during_submission(self):
     # Setup
     issue = IssueSubmissionFactory.create(journal=self.journal)
     rfile = ResumableFile.objects.create(path='dummy/path.png', filesize=42, uploadsize=10)
     issue.last_files_version.submissions.add(rfile)
     # Run
     issue.submit()
     # Check
     assert issue.files_versions.count() == 1
     assert issue.files_versions.all()[0].submissions.count() == 0
Ejemplo n.º 4
0
 def test_can_remove_incomplete_files_during_submission(self):
     # Setup
     issue = IssueSubmissionFactory.create(journal=self.journal)
     rfile = ResumableFile.objects.create(path='dummy/path.png',
                                          filesize=42,
                                          uploadsize=10)
     issue.last_files_version.submissions.add(rfile)
     # Run
     issue.submit()
     # Check
     assert issue.files_versions.count() == 1
     assert issue.files_versions.all()[0].submissions.count() == 0
Ejemplo n.º 5
0
 def test_version(self):
     issue = IssueSubmissionFactory.create(journal=self.journal)
     new_files_version = issue.save_version()
     assert issue.files_versions.count() == 2
     assert issue.last_files_version == new_files_version
Ejemplo n.º 6
0
 def test_version(self):
     issue = IssueSubmissionFactory.create(journal=self.journal)
     new_files_version = issue.save_version()
     assert issue.files_versions.count() == 2
     assert issue.last_files_version == new_files_version