def test_mark_job_run_as_aborted(wo_client):
    aborted_at = Utils.utc_now()

    wo_client.mark_job_run_as_aborted(
        run_id='71feb41b-be50-428c-8470-37b9c292f787', at=aborted_at)

    wo_client._backend.post.assert_called_once_with(
        path=MarquezWriteOnlyClient._path(
            '/jobs/runs/71feb41b-be50-428c-8470-37b9c292f787/abort?at={0}',
            aborted_at),
        headers=mock.ANY)
Example #2
0
 def new_write_only_client():
     return MarquezWriteOnlyClient(backend=Clients._backend_from_env(), )
def test_path():
    path = MarquezWriteOnlyClient._path('/test/{0}', '1')

    assert path == '/api/v1/test/1'
def wo_client():
    return MarquezWriteOnlyClient(backend=mock.Mock())
def test_path():
    path = MarquezWriteOnlyClient._path('/namespaces/{0}', 'test-namespace')
    assert path == '/namespaces/test-namespace'