def ImageID(self) -> str: """Optionally generate a unique image identifier. Returns: The image identifier as a string. """ return identifier.check_id()
def test_check_id_file(self, wpe, gv, checkfile): gv.return_value = None wpe.return_value = False checkfile.return_value = TEST_ID self.assertEqual(identifier.check_id(), TEST_ID)
def test_check_id_get(self, gv): gv.return_value = TEST_ID self.assertEqual(identifier.check_id(), TEST_ID)
def test_check_id_set(self, wpe, gv, setid): gv.return_value = None wpe.return_value = True identifier.check_id() self.assertTrue(setid.called)