Specify correct number of arguments for modified _visit_child_role()

This commit is contained in:
Vladimir Diaz 2016-03-31 13:26:06 -04:00
parent 44ebd65b34
commit 09f6261b4a

View file

@ -1327,18 +1327,18 @@ def test_10__visit_child_role(self):
child_role = targets_role['delegations']['roles'][0]
self.assertEqual(self.repository_updater._visit_child_role(child_role,
'/file3.txt'), child_role['name'])
'/file3.txt', targets_role['delegations']), child_role['name'])
# Test path hash prefixes.
child_role['path_hash_prefixes'] = ['8baf', '0000']
self.assertEqual(self.repository_updater._visit_child_role(child_role,
'/file3.txt'), child_role['name'])
'/file3.txt', targets_role['delegations']), child_role['name'])
# Test if both 'path' and 'path_hash_prefixes' is missing.
del child_role['paths']
del child_role['path_hash_prefixes']
self.assertRaises(tuf.FormatError, self.repository_updater._visit_child_role,
child_role, child_role['name'])
child_role, targets_role['delegations'], child_role['name'])