def test_rejects_wrong_project_name(self): field = DSIssueURLField() ds_url = "{base}AA-1234".format(base=settings.DS_ISSUE_HOST) with self.assertRaises(ValidationError): field.clean(ds_url)
def test_accepts_ds_url_field(self): field = DSIssueURLField() ds_url = "{base}DS-1234".format(base=settings.DS_ISSUE_HOST) cleaned = field.clean(ds_url) self.assertEqual(cleaned, ds_url)