compiler.tests.test_compiler module

Tests for compiler.start_compilationr.

class compiler.tests.test_compiler.TestDoCompile(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test main compilation routine.

test_cannot_save(mock_store, mock_run, mock_filemanager)[source]

There is a problem storing the results.

test_connection_failed(mock_store, mock_run, mock_filemanager)[source]

Request to filemanager fails.

test_do_compile_success(mock_store, mock_run, mock_filemanager)[source]

Everything goes according to plan.

test_forbidden(mock_store, mock_run, mock_filemanager)[source]

Request to filemanager is forbidden.

test_no_output(mock_store, mock_run, mock_filemanager)[source]

Compilation generates no output.

test_not_found(mock_store, mock_run, mock_filemanager)[source]

Request to filemanager fails because there is no source package.

test_source_corrupted(mock_store, mock_run, mock_filemanager)[source]

There is a problem with the content of the source package.

test_unauthorized(mock_store, mock_run, mock_filemanager)[source]

Request to filemanager is unauthorized.

class compiler.tests.test_compiler.TestGetTask(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test get_task().

test_get_failed(mock_do)[source]

Task exists and failed.

test_get_failed_gracefully(mock_do)[source]

Task exists and failed gracefully.

test_get_nonexistant_task(mock_do)[source]

There is no such task.

test_get_retry_task(mock_do)[source]

Task exists and is being retried.

test_get_started_task(mock_do)[source]

Task exists and has started.

test_get_succeeded(mock_do)[source]

Task exists and succeeded.

test_get_unstarted_task(mock_do)[source]

Task exists, but has not started.

class compiler.tests.test_compiler.TestRun(methodName='runTest')[source]

Bases: unittest.case.TestCase

Tests for compiler._run().

test_run(mock_current_app, mock_dock)[source]

Compilation is successful.

test_run_fails(mock_current_app, mock_dock)[source]

Compilation fails.

class compiler.tests.test_compiler.TestStartCompilation(methodName='runTest')[source]

Bases: unittest.case.TestCase

Test start_compilation().

test_start_compilation_errs(mock_do_compile)[source]

An error occurs when starting compilation.

test_start_compilation_ok()[source]

Compilation starts succesfully.