Exemple #1
0
 def test_valid_data(self):
     form = DatasetForm({
         'project_name': 'project name',
         'summary': 'summary',
         'sample_size': 2,
         'license_title': 'PPDL',
         'workflow_stage': 'SUBMITTED',
         'status': 'UNPUBLISHED'
     })
     self.assertTrue(form.is_valid())
     dataset = form.save()
     self.assertEqual(dataset.project_name, 'project name')
     self.assertEqual(dataset.summary, 'summary')
     self.assertEqual(dataset.sample_size, 2)
     self.assertEqual(dataset.license_title, 'PPDL')
     self.assertEqual(dataset.workflow_stage, 'SUBMITTED')
     self.assertEqual(dataset.status, 'UNPUBLISHED')
Exemple #2
0
 def test_valid_data(self):
     form = DatasetForm({
         'project_name': 'project name',
         'summary': 'summary',
         'sample_size': 2,
         'license_title': 'PPDL',
         'workflow_stage': 'SUBMITTED',
         'status': 'UNPUBLISHED'
     })
     self.assertTrue(form.is_valid())
     dataset = form.save()
     self.assertEqual(dataset.project_name, 'project name')
     self.assertEqual(dataset.summary, 'summary')
     self.assertEqual(dataset.sample_size, 2)
     self.assertEqual(dataset.license_title, 'PPDL')
     self.assertEqual(dataset.workflow_stage, 'SUBMITTED')
     self.assertEqual(dataset.status, 'UNPUBLISHED')
Exemple #3
0
 def test_blank_data(self):
     form = DatasetForm({})
     self.assertFalse(form.is_valid())
Exemple #4
0
 def test_blank_data(self):
     form = DatasetForm({})
     self.assertFalse(form.is_valid())