def _test_tags(self, resources, needed): self.assertTrue(len(resources) > 0) self.assertNotIn("!!", ResourceGenerator._dump_yaml(resources)) for _, attributes in six.iteritems(resources): self.assertIn("tags", attributes) self.assertIsNotNone(attributes["tags"]) self.assertEqual(len(attributes["tags"]), len(needed))
def _test_tags(self, resources, needed): self.assertTrue(len(resources) > 0) self.assertNotIn('!!', ResourceGenerator._dump_yaml(resources)) for host, attributes in six.iteritems(resources): self.assertIn('tags', attributes) self.assertIsNotNone(attributes['tags']) self.assertEqual(len(attributes['tags']), len(needed))
def _test_attributes(self, resources, needed): self.assertTrue(len(resources) > 0) self.assertNotIn("!!", ResourceGenerator._dump_yaml(resources)) for _, attributes in six.iteritems(resources): for attribute in needed: self.assertIn(attribute, attributes) self.assertIsNotNone(attributes[attribute]) self.assertNotEqual(attributes[attribute], "")