def test_unique_id_without_flag(self): self.assertEqual(paths.get_unique_id(), (str(paths._ACME_ID), ))
def test_unique_id_with_flag(self): with flagsaver.flagsaver((paths.ACME_ID, 'test_flag')): self.assertEqual(paths.get_unique_id(), ('test_flag', ))
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()
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.