def test_networks_get_all(self): dbapi.networks_create(self.context, network1) filters = {} res = dbapi.networks_get_by_region(self.context, network1['region_id'], filters) self.assertEqual(len(res), 1) self.assertEqual(res[0]['name'], 'test network')
def test_networks_get_by_name_filter_no_exit(self): filters = {"id": 5} res = dbapi.networks_get_by_region(self.context, network1['region_id'], filters) self.assertEqual(res, [])