def test_without_json_manifest(tmpdir): path = str(tmpdir.join('no-manifest')) create_repo(path) with pytest.raises(SystemExit): cli.process_arguments( path, get_defaults(), client_cfg={}, environ={}, )
def test_push_also_builds(tmpdir): path = str(tmpdir.join("no-manifest")) create_repo(path) in_args = get_defaults() in_args["push"] = True _, no_build, _, _, _, _ = cli.process_arguments(path, in_args, client_cfg={}, environ={"SW_NAMESPACE": "eg"}) assert not no_build
def test_push_also_builds(tmpdir): path = str(tmpdir.join('no-manifest')) create_repo(path) in_args = get_defaults() in_args['push'] = True _, no_build, _, _, _, _ = cli.process_arguments( path, in_args, client_cfg={}, environ={'SW_NAMESPACE': 'eg'}, ) assert not no_build
def test_assert_hostname(tmpdir): path = str(tmpdir.join("no-manifest")) create_repo(path) args = get_defaults() args["--x-assert-hostname"] = True tls_config = tls.TLSConfig() _, _, _, _, _, client = cli.process_arguments( path, args, client_cfg={"base_url": "https://example.com:443/api/v1/", "tls": tls_config}, environ={"SW_NAMESPACE": "eg"}, ) assert not client.adapters["https://"].assert_hostname
def test_assert_hostname(tmpdir): path = str(tmpdir.join('no-manifest')) create_repo(path) args = get_defaults() args['--x-assert-hostname'] = True tls_config = tls.TLSConfig() _, _, _, _, _, client = cli.process_arguments( path, args, client_cfg={ 'base_url': 'https://example.com:443/api/v1/', 'tls': tls_config, }, environ={'SW_NAMESPACE': 'eg'}, ) assert not client.adapters['https://'].assert_hostname