Esempio n. 1
0
    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)
Esempio n. 2
0
    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
Esempio n. 3
0
    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
Esempio n. 4
0
    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)
Esempio n. 5
0
    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, [])
Esempio n. 6
0
    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, [])