def test_returns_true_if_already_owned_by_this_conductor_always(self): self.already_owned.return_value = True ret = has_capability( 'registered_and_evaluates_to_false', jobboard_job=self.job ) self.assertTrue(ret)
def test_has_capability_returns_false_if_registered_and_returns_false(self): ret = has_capability( 'registered_and_evaluates_to_false', jobboard_job=self.job ) self.assertFalse(ret)
def test_has_capability_passes_job_as_arg_to_capability_checker(self): # Will throw AssertionError if the jobboard_job kwarg is not self.job has_capability('check_if_arg_is_job', jobboard_job=self.job)
def test_has_capability_returns_false_if_capability_not_registered(self): ret = has_capability( 'does_not_exist', jobboard_job=self.job ) self.assertFalse(ret)