Fixed the policy tests in Python 3
The file builtin was removed in Python 3. open should be used instead. bp python3 Change-Id: Ib394b9ceeffb1ae8fd4cbebbd0818c64e24e55e6
This commit is contained in:
parent
410ddb826f
commit
3ec0c5e693
|
@ -209,7 +209,7 @@ class DefaultPolicyTestCase(tests.TestCase):
|
|||
class PolicyJsonTestCase(tests.TestCase):
|
||||
|
||||
def _load_entries(self, filename):
|
||||
return set(json.load(file(filename)))
|
||||
return set(json.load(open(filename)))
|
||||
|
||||
def test_json_examples_have_matching_entries(self):
|
||||
policy_keys = self._load_entries(tests.dirs.etc('policy.json'))
|
||||
|
|
Loading…
Reference in New Issue