Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_pclient():
c = peeringdb.PeeringDB(helper.CONFIG)
c._updater._ContextClass = _PartialEnabledContext
return c
def get_client():
return peeringdb.PeeringDB(helper.CONFIG)
def test_dry_run(client_empty):
client = peeringdb.PeeringDB(helper.CONFIG, dry_run=True)
rs = all_resources()
client.update_all(rs)
# still empty?
with pytest.raises(peeringdb.get_backend().object_missing_error()):
client.get(Network, FIRST_NET)