Exemplo n.º 1
0
    def tearDown(self):
        super(HostingServiceRegistrationTests, self).tearDown()

        # Unregister the service, going back to a default state. It's okay
        # if it fails.
        #
        # This will match whichever service we added for testing.
        try:
            unregister_hosting_service('dummy-service')
        except ItemLookupError:
            pass
Exemplo n.º 2
0
    def tearDown(self):
        super(HostingServiceRegistrationTests, self).tearDown()

        # Unregister the service, going back to a default state. It's okay
        # if it fails.
        #
        # This will match whichever service we added for testing.
        try:
            unregister_hosting_service('dummy-service')
        except ItemLookupError:
            pass
Exemplo n.º 3
0
    def test_unregistration_with_urls(self):
        """Testing HostingService unregistration with URLs"""
        register_hosting_service("dummy-service", self.DummyServiceWithURLs)
        unregister_hosting_service("dummy-service")

        with self.assertRaises(NoReverseMatch):
            local_site_reverse(
                "dummy-service-post-commit-hook", kwargs={"repository_id": 1, "hosting_service_id": "dummy-service"}
            ),

        # Once unregistered, should not be able to unregister again
        with self.assertRaises(ItemLookupError):
            unregister_hosting_service("dummy-service")
Exemplo n.º 4
0
    def test_unregistration_with_urls(self):
        """Testing HostingService unregistration with URLs"""
        register_hosting_service('dummy-service', self.DummyServiceWithURLs)
        unregister_hosting_service('dummy-service')

        with self.assertRaises(NoReverseMatch):
            local_site_reverse('dummy-service-post-commit-hook',
                               kwargs={
                                   'repository_id': 1,
                                   'hosting_service_id': 'dummy-service',
                               }),

        # Once unregistered, should not be able to unregister again
        with self.assertRaises(ItemLookupError):
            unregister_hosting_service('dummy-service')
Exemplo n.º 5
0
    def tearDownClass(cls):
        super(DownloadFileTests, cls).tearDownClass()

        unregister_hosting_service(TestService.name)
Exemplo n.º 6
0
    def shutdown(self):
        super(HostingServiceHook, self).shutdown()

        unregister_hosting_service(self.name)
Exemplo n.º 7
0
 def test_unregister(self):
     """Testing HostingService unregistration"""
     register_hosting_service('dummy-service', self.DummyService)
     unregister_hosting_service('dummy-service')
Exemplo n.º 8
0
    def shutdown(self):
        super(HostingServiceHook, self).shutdown()

        unregister_hosting_service(self.name)
    def tearDown(self):
        super(HostingServiceAuthFormTests, self).tearDown()

        unregister_hosting_service(SelfHostedTestService.hosting_service_id)
        unregister_hosting_service(TestService.hosting_service_id)
Exemplo n.º 10
0
    def tearDown(self):
        super(RepositoryFormTests, self).tearDown()

        unregister_hosting_service('self_hosted_test')
        unregister_hosting_service('test')
    def tearDownClass(cls):
        super(DownloadDiffFileViewTests, cls).tearDownClass()

        unregister_hosting_service(TestService.name)
Exemplo n.º 12
0
 def test_unregister(self):
     """Testing HostingService unregistration"""
     register_hosting_service('dummy-service', self.DummyService)
     unregister_hosting_service('dummy-service')
    def tearDown(self):
        super(HostingServiceAuthFormTests, self).tearDown()

        unregister_hosting_service('self_hosted_test')
        unregister_hosting_service('test')
Exemplo n.º 14
0
    def tearDown(self):
        super(RepositoryFormTests, self).tearDown()

        unregister_hosting_service('self_hosted_test')
        unregister_hosting_service('test')