def test_everything_defaults_to_empty_string(): o = OptionParser() opts, args = o.parse_args([]) actual = (opts.configuration_scripts, opts.network_address, opts.network_engine, opts.logging_threshold, opts.project_root, opts.www_root, opts.changes_reload, opts.charset_dynamic, opts.charset_static, opts.indices, opts.media_type_default, opts.media_type_json, opts.renderer_default, opts.show_tracebacks) expected = (DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT) assert actual == expected, actual
def test_everything_defaults_to_empty_string(): o = OptionParser() opts, args = o.parse_args([]) actual = ( opts.configuration_scripts , opts.logging_threshold , opts.project_root , opts.www_root , opts.changes_reload , opts.charset_dynamic , opts.charset_static , opts.indices , opts.media_type_default , opts.media_type_json , opts.renderer_default , opts.show_tracebacks ) expected = ( DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT , DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT, DEFAULT ) assert actual == expected
def test_configuration_scripts_really_doesnt_do_anything_special(): o = OptionParser() opts, args = o.parse_args(['--configuration_scripts=Cheese is lovely.']) actual = opts.configuration_scripts expected = 'Cheese is lovely.' assert actual == expected
def test_configuration_scripts_can_take_two_doesnt_do_anything_special(): o = OptionParser() opts, args = o.parse_args(['--configuration_scripts=startup.py,uncle.py']) actual = opts.configuration_scripts expected = 'startup.py,uncle.py' assert actual == expected
def test_configuration_scripts_can_take_one(): o = OptionParser() opts, args = o.parse_args(['--configuration_scripts=startup.py']) actual = opts.configuration_scripts expected = 'startup.py' assert actual == expected
def test_logging_threshold_goes_to_eleven(): o = OptionParser() opts, args = o.parse_args(['--logging_threshold=11']) actual = opts.logging_threshold expected = '11' assert actual == expected
def test_configuration_scripts_works_at_all(): o = OptionParser() opts, args = o.parse_args(['--configuration_scripts', "foo"]) expected = "foo" actual = opts.configuration_scripts assert actual == expected
def test_logging_threshold_goes_to_one(): o = OptionParser() opts, args = o.parse_args(['-l1']) actual = opts.logging_threshold expected = '1' assert actual == expected, actual