def test_execution(self): if getattr(settings, 'RUN_ONLINE_TESTS', False): result = execute_test(self.site, self.test) #If this fails because our sites are down, I'm sorry :D self.assertTrue(result) else: print "WARNING: Skipping online tests. Set RUN_ONLINE_TESTS to True in your settings to run them"
def test_execution(self): if getattr(settings, 'KONG_RUN_ONLINE_TESTS', False): result = execute_test(self.site, self.test) #If this fails because our sites are down, I'm sorry :D self.assertTrue(result) #TODO: Fix Django so you can check return values here #For now we can just manually inspect it. call_command('check_sites') else: print "WARNING: Skipping online tests. Set KONG_RUN_ONLINE_TESTS to True in your settings to run them"
def run_test_on_site(request, site_slug, test_slug): test = Test.objects.get(slug=test_slug) site = Site.objects.get(slug=site_slug) execute_test(site, test) return test_detail_for_site(request, site_slug, test_slug)
def run_tests(self): all_passed = True for test in self.all_tests.all(): passed = execute_test(self, test) all_passed = passed and all_passed return all_passed
def run_tests(self): all_passed = True for site in test.all_sites.all(): passed = execute_test(site, self) all_passed = passed and all_passed return all_passed
def run_test_on_site(request, test_slug, site_slug): test = Test.objects.get(slug=test_slug) site = Site.objects.get(slug=site_slug) execute_test(site, test) return test_object_for_site(request, test_slug, site_slug)
def run_tests(self): all_passed = True for site in self.all_sites.all(): passed = execute_test(site, self) all_passed = passed and all_passed return all_passed