def test_make_it(self): sot = recordset.Recordset(**EXAMPLE) self.assertEqual(IDENTIFIER, sot.id) self.assertEqual(EXAMPLE['description'], sot.description) self.assertEqual(EXAMPLE['ttl'], sot.ttl) self.assertEqual(EXAMPLE['type'], sot.type) self.assertEqual(EXAMPLE['name'], sot.name) self.assertEqual(EXAMPLE['status'], sot.status)
def test_basic(self): obj = recordset.Recordset() self.assertEqual("/zones/%(zone_id)s/recordsets", obj.base_path) self.assertEqual("recordset", obj.resource_key) self.assertEqual("recordsets", obj.resources_key) self.assertTrue(obj.allow_get) self.assertTrue(obj.allow_list) self.assertTrue(obj.allow_delete) self.assertTrue(obj.allow_create) self.assertEqual("dns", obj.service.service_type)
def test_make_it(self): obj = recordset.Recordset(**DATA) self.assertEqual(DATA["name"], obj.name) self.assertEqual(DATA["id"], obj.id) self.assertEqual(DATA["description"], obj.description) self.assertEqual(DATA["type"], obj.type) self.assertEqual(DATA["ttl"], obj.ttl) self.assertEqual(DATA["records"], obj.records) self.assertEqual(DATA["links"], obj.links) self.assertEqual(DATA["status"], obj.status) self.assertEqual(DATA["zone_id"], obj.zone_id) self.assertEqual(DATA["zone_name"], obj.zone_name) self.assertEqual(DATA["update_at"], obj.update_at) self.assertEqual(DATA["create_at"], obj.create_at) self.assertEqual(DATA["default"], obj.default) self.assertEqual(DATA["project_id"], obj.project_id) self.assertEqual(DATA["tags"], obj.tags)
def test_basic(self): sot = recordset.Recordset() self.assertIsNone(sot.resource_key) self.assertEqual('recordsets', sot.resources_key) self.assertEqual('/zones/%(zone_id)s/recordsets', sot.base_path) self.assertTrue(sot.allow_list) self.assertTrue(sot.allow_create) self.assertTrue(sot.allow_fetch) self.assertTrue(sot.allow_commit) self.assertTrue(sot.allow_delete) self.assertDictEqual( { 'data': 'data', 'description': 'description', 'limit': 'limit', 'marker': 'marker', 'name': 'name', 'status': 'status', 'ttl': 'ttl', 'type': 'type' }, sot._query_mapping._mapping)
def test_delete_recordset_with_instance2(self): self.proxy.delete_recordset(_zone.Zone(id="zone-id"), _recordset.Recordset(id="recordset-id")) self.assert_session_delete("zones/zone-id/recordsets/recordset-id")