예제 #1
0
    def test_access_token_undefined(self):
        """If Bodhi is not configured with an access token, the result should be False."""
        u = Update.query.all()[0]
        u.test_gating_status = TestGatingStatus.failed
        u.status = models.UpdateStatus.testing

        self.assertFalse(util.can_waive_test_results(None, u))
예제 #2
0
 def test_update_is_stable(self):
     """
     Assert that it should return false if the update is stable, even if
     other conditions are met.
     """
     u = Update.query.all()[0]
     u.test_gating_status = TestGatingStatus.failed
     u.status = models.UpdateStatus.stable
     self.assertFalse(util.can_waive_test_results(None, u))
예제 #3
0
 def test_all_tests_passed(self):
     """
     Assert that it should return false if all tests passed, even if
     other conditions are met.
     """
     u = Update.query.all()[0]
     u.test_gating_status = TestGatingStatus.passed
     u.status = models.UpdateStatus.testing
     self.assertFalse(util.can_waive_test_results(None, u))
예제 #4
0
 def test_can_waive_test_results(self):
     u = Update.query.all()[0]
     u.test_gating_status = TestGatingStatus.failed
     u.status = models.UpdateStatus.testing
     self.assertTrue(util.can_waive_test_results(None, u))