Esempio n. 1
0
File: test_cli.py Progetto: 20c/rdap
def test_write_bootstrap_data(tmpdir):
    config_file = str(os.path.join(tmpdir, "config.yml"))
    with open(config_file, "w") as fh:
        fh.write("rdap: {}")

    args = ["--home", str(tmpdir), "--write-bootstrap-data", "asn"]
    rv = main(args)
    assert os.path.isfile(os.path.join(tmpdir, "bootstrap", "asn.json"))
    assert rv == 0
Esempio n. 2
0
def test_usage():
    with pytest.raises(SystemExit) as excinfo:
        main()
    assert 2 == excinfo.value.code
Esempio n. 3
0
def test_lookup():
    args = ["as63311", "--show-requests"]
    main(args)
Esempio n. 4
0
File: test_cli.py Progetto: 20c/rdap
def test_lookup():
    args = ["as63311", "--show-requests"]
    rv = main(args)
    assert rv == 0