Exemplo n.º 1
0
 def test_delete_existing_job_returns_none_on_not_found(self, mock_kube):
     self.assertIsNone(job_processor.delete_existing_job({"id": "my-id"}))
     mock_kube.delete_namespaced_job.assert_called_once_with(
         "contract-my-id",
         "",
         body=kubernetes.client.V1DeleteOptions(
             propagation_policy="Background"))
Exemplo n.º 2
0
 def test_delete_existing_job(self, mock_kube):
     self.assertEqual(job_processor.delete_existing_job({"id": "my-id"}),
                      {"test": "dict"})
     mock_kube.delete_namespaced_job.assert_called_once_with(
         "contract-my-id",
         "",
         body=kubernetes.client.V1DeleteOptions(
             propagation_policy="Background"))