示例#1
0
 def test_trust_show(self):
     args = self.Args()
     testobj = Trust(policy_filename=os.path.join(FIXTURE_DIR, "show_policy.json"))
     testobj.atomic_config = util.get_atomic_config(atomic_config=os.path.join(FIXTURE_DIR, "atomic.conf"))
     testobj.set_args(args)
     with self.captured_output() as (out, _):
         testobj.show()
     with open(os.path.join(FIXTURE_DIR, "show_policy.output"), "r") as f:
         expected = f.read()
         actual = out.getvalue()
         self.assertEqual(expected, actual)
示例#2
0
 def test_trust_show(self):
     args = self.Args()
     testobj = Trust(
         policy_filename=os.path.join(FIXTURE_DIR, "show_policy.json"))
     testobj.atomic_config = util.get_atomic_config(
         atomic_config=os.path.join(FIXTURE_DIR, "atomic.conf"))
     testobj.set_args(args)
     with self.captured_output() as (out, _):
         testobj.show()
     with open(os.path.join(FIXTURE_DIR, "show_policy.output"), 'r') as f:
         expected = f.read()
         actual = out.getvalue()
         self.assertEqual(expected, actual)