예제 #1
0
 def test_valid_data(self):
     publication_document = ModelFactory.make('PublicationDocument')
     document = publication_document.document
     form = PublicationDocumentForm(
         {},
         {'document': SimpleUploadedFile(document.name, document.read())})
     self.assertTrue(form.is_valid())
예제 #2
0
 def test_blank_data(self):
     form = PublicationDocumentForm({})
     self.assertFalse(form.is_valid())
예제 #3
0
 def test_valid_data(self):
     publication_document = ModelFactory.make('PublicationDocument')
     document = publication_document.document
     form = PublicationDocumentForm({},
         {'document': SimpleUploadedFile(document.name, document.read())})
     self.assertTrue(form.is_valid())
예제 #4
0
 def test_blank_data(self):
     form = PublicationDocumentForm({})
     self.assertFalse(form.is_valid())