def test_check_required_keys(self): """Test check_required_keys function.""" self.assertTrue( check_required_keys({ 'one': 1, 'two': 2 }, ['one', 'two'])) self.assertFalse( check_required_keys({ 'one': 1, 'two': 2 }, ('one', 'two', 'three'))) self.assertTrue(check_required_keys({'one': 1, 'two': 2}, ['one'])) req_keys = ['name', 'version'] self.assertTrue( check_required_keys({ 'name': 'intel', 'version': '2015a' }, req_keys)) self.assertFalse(check_required_keys({'name': 'intel'}, req_keys)) self.assertTrue( check_required_keys( { 'name': 'foo', 'version': '1.2.3', 'versionsuffix': '-test' }, req_keys)) self.assertFalse( check_required_keys({ 'name': 'foo', 'versionsuffix': '-test' }, req_keys))
def test_check_required_keys(self): """Test check_required_keys function.""" self.assertTrue(check_required_keys({'one': 1, 'two': 2}, ['one', 'two'])) self.assertFalse(check_required_keys({'one': 1, 'two': 2}, ('one', 'two', 'three'))) self.assertTrue(check_required_keys({'one': 1, 'two': 2}, ['one'])) req_keys = ['name', 'version'] self.assertTrue(check_required_keys({'name': 'intel', 'version': '2015a'}, req_keys)) self.assertFalse(check_required_keys({'name': 'intel'}, req_keys)) self.assertTrue(check_required_keys({'name': 'foo', 'version': '1.2.3', 'versionsuffix': '-test'}, req_keys)) self.assertFalse(check_required_keys({'name': 'foo', 'versionsuffix': '-test'}, req_keys))