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
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")
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')
def tearDownClass(cls): super(DownloadFileTests, cls).tearDownClass() unregister_hosting_service(TestService.name)
def shutdown(self): super(HostingServiceHook, self).shutdown() unregister_hosting_service(self.name)
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(SelfHostedTestService.hosting_service_id) unregister_hosting_service(TestService.hosting_service_id)
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)
def tearDown(self): super(HostingServiceAuthFormTests, self).tearDown() unregister_hosting_service('self_hosted_test') unregister_hosting_service('test')