def test_minimal(self): project = self.create_project() version = "bbee5b51f84611e4b14834363b8514c2" hook = ReleaseHook(project) hook.finish_release(version) release = Release.objects.get(organization_id=project.organization_id, version=version) assert release.date_released assert release.organization assert ReleaseProject.objects.get(release=release, project=project)
def test_minimal(self): project = self.create_project() version = 'bbee5b51f84611e4b14834363b8514c2' hook = ReleaseHook(project) hook.finish_release(version) release = Release.objects.get( project=project, version=version, ) assert release.date_released
def test_minimal(self): project = self.create_project() version = 'bbee5b51f84611e4b14834363b8514c2' hook = ReleaseHook(project) hook.finish_release(version) release = Release.objects.get( project=project, version=version, ) assert release.date_released
def test_minimal(self): project = self.create_project() version = 'bbee5b51f84611e4b14834363b8514c2' hook = ReleaseHook(project) hook.finish_release(version) release = Release.objects.get( organization_id=project.organization_id, version=version, ) assert release.date_released assert release.organization assert ReleaseProject.objects.get(release=release, project=project)
def test_bad_version(self): project = self.create_project() hook = ReleaseHook(project) version = '' with self.assertRaises(HookValidationError): hook.start_release(version) with self.assertRaises(HookValidationError): hook.finish_release(version) with self.assertRaises(HookValidationError): hook.set_commits(version, []) version = '.' with self.assertRaises(HookValidationError): hook.start_release(version) with self.assertRaises(HookValidationError): hook.finish_release(version) with self.assertRaises(HookValidationError): hook.set_commits(version, []) version = '..' with self.assertRaises(HookValidationError): hook.start_release(version) with self.assertRaises(HookValidationError): hook.finish_release(version) with self.assertRaises(HookValidationError): hook.set_commits(version, [])
def test_bad_version(self): project = self.create_project() hook = ReleaseHook(project) version = '' with self.assertRaises(HookValidationError): hook.start_release(version) with self.assertRaises(HookValidationError): hook.finish_release(version) with self.assertRaises(HookValidationError): hook.set_commits(version, []) version = '.' with self.assertRaises(HookValidationError): hook.start_release(version) with self.assertRaises(HookValidationError): hook.finish_release(version) with self.assertRaises(HookValidationError): hook.set_commits(version, []) version = '..' with self.assertRaises(HookValidationError): hook.start_release(version) with self.assertRaises(HookValidationError): hook.finish_release(version) with self.assertRaises(HookValidationError): hook.set_commits(version, [])