- self.assertDictContainsSubset(
- {'name': 'XPDR1-NETWORK1-ODU', 'administrative-state': 'inService',
- 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
- 'type': 'org-openroadm-interfaces:otnOdu',
- 'supporting-port': '1',
- 'supporting-interface': 'XPDR1-NETWORK1-OTU'},
- res['interface'][0])
- self.assertDictContainsSubset(
- {'rate': 'org-openroadm-otn-common-types:ODU4',
- u'monitoring-mode': u'terminated'},
- res['interface'][0]['org-openroadm-otn-odu-interfaces:odu'])
+ # the 2 following statements replace self.assertDictContainsSubset deprecated in python 3.2
+ self.assertDictEqual(
+ dict({
+ 'name': 'XPDR1-NETWORK1-ODU',
+ 'administrative-state': 'inService',
+ 'supporting-circuit-pack-name': '1/0/1-PLUG-NET',
+ 'type': 'org-openroadm-interfaces:otnOdu',
+ 'supporting-port': '1',
+ 'supporting-interface': 'XPDR1-NETWORK1-OTU'
+ }, **res['interface'][0]),
+ res['interface'][0]
+ )
+ self.assertDictEqual(
+ dict({
+ 'rate': 'org-openroadm-otn-common-types:ODU4',
+ u'monitoring-mode': u'terminated'
+ }, **res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']),
+ res['interface'][0]['org-openroadm-otn-odu-interfaces:odu']
+ )