Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_plural_deplural(self):
# forward
for r_name in ('escalation_policies', 'services', 'log_entries'):
self.assertEqual(
r_name,
pdpyras.resource_name(pdpyras.object_type(r_name))
)
# reverse
for o_name in ('escalation_policy', 'service', 'log_entry'):
self.assertEqual(
o_name,
pdpyras.object_type(pdpyras.resource_name(o_name))
)
def test_plural_deplural(self):
# forward
for r_name in ('escalation_policies', 'services', 'log_entries'):
self.assertEqual(
r_name,
pdpyras.resource_name(pdpyras.object_type(r_name))
)
# reverse
for o_name in ('escalation_policy', 'service', 'log_entry'):
self.assertEqual(
o_name,
pdpyras.object_type(pdpyras.resource_name(o_name))
)