tests: fake db, check db stored attibutes for networks and routes, fix bugs