Exemple #1
0
 def test_unique_id_without_flag(self):
     self.assertEqual(paths.get_unique_id(), (str(paths._ACME_ID), ))
Exemple #2
0
 def test_unique_id_with_flag(self):
     with flagsaver.flagsaver((paths.ACME_ID, 'test_flag')):
         self.assertEqual(paths.get_unique_id(), ('test_flag', ))
Exemple #3
0
 def test_unique_id_with_flag(self):
     argv = ('./program', '--acme_id=test_flag')
     FLAGS(argv)
     self.assertEqual(paths.get_unique_id(), ('test_flag', ))
     FLAGS.unparse_flags()
Exemple #4
0
 def test_unique_id_with_flag(self):
     FLAGS.acme_id = 'test_flag'
     self.assertEqual(paths.get_unique_id(), ('test_flag', ))
     FLAGS.acme_id = None  # Needed for pytest, which is not hermetic.