<s> import pytest <EOL> def _check_exits_zero ( result ) : <EOL> assert result . exit_code == <NUM_LIT:0> <EOL> def _check_output_contains ( result , match ) : <EOL> assert match in result . output <EOL> def _check_output_does_not_contain ( result , match ) : <EOL> assert match not in result . output <EOL> @ pytest . mark . integration <EOL> def test_help ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_contains ( result , "<STR_LIT>" ) <EOL> @ pytest . mark . integration <EOL> def test_list ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT:list>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_does_not_contain ( result , env [ '<STR_LIT>' ] ) <EOL> @ pytest . mark . integration <EOL> def test_deploy ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_list_again ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT:list>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_contains ( result , env [ '<STR_LIT>' ] ) <EOL> @ pytest . mark . integration <EOL> def test_show ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_contains ( result , "<STR_LIT>" % env [ '<STR_LIT>' ] ) <EOL> @ pytest . mark . integration <EOL> def test_scale ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_show_again ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_contains ( result , "<STR_LIT>" % <NUM_LIT:3> ) <EOL> _check_output_contains ( result , "<STR_LIT>" % <NUM_LIT:0.1> ) <EOL> _check_output_contains ( result , "<STR_LIT>" % <NUM_LIT> ) <EOL> @ pytest . mark . integration <EOL> def test_scale_again ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_show_yet_again ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_contains ( result , "<STR_LIT>" % <NUM_LIT:2> ) <EOL> _check_output_contains ( result , "<STR_LIT>" % <NUM_LIT:0.1> ) <EOL> _check_output_contains ( result , "<STR_LIT>" % <NUM_LIT> ) <EOL> @ pytest . mark . integration <EOL> def test_config_list ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT:list>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_does_not_contain ( result , "<STR_LIT>" ) <EOL> _check_output_does_not_contain ( result , "<STR_LIT>" ) <EOL> @ pytest . mark . integration <EOL> def test_config_set ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_config_list_again ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT:list>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_contains ( result , "<STR_LIT>" ) <EOL> _check_output_contains ( result , "<STR_LIT>" ) <EOL> @ pytest . mark . integration <EOL> def test_config_unset ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_config_list_yet_again ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT:list>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> _check_output_does_not_contain ( result , "<STR_LIT>" ) <EOL> _check_output_does_not_contain ( result , "<STR_LIT>" ) <EOL> @ pytest . mark . integration <EOL> def test_logs ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_show ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_set ( runner , env ) : <EOL> result = runner ( <EOL> [ <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] , <EOL> env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_show_after_add ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_output_contains ( result , '<STR_LIT>' ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_run ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_delete_tasks ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_delete ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_exits_zero ( result ) <EOL> @ pytest . mark . integration <EOL> def test_cron_show_after_delete ( runner , env ) : <EOL> result = runner ( [ "<STR_LIT>" , "<STR_LIT>" ] , env = env ) <EOL> _check_output_does_not_contain ( result , '<STR_LIT>' ) <EOL> _check_exits_zero ( result ) </s>
