def testFromTxt(self): #new a map #push something #save #new map from txt #check 'something' cmd_map = Map() cmd_map.push('1615246874', '3.3.1/6') cmd_map.push('1615246874', '3.3.2/6') cmd_map.toFile('map_ut.txt') new_map = Map().fromFile('map_ut.txt') self.assertTrue(new_map.inMap('1615246874')) self.assertFalse(new_map.inMap('789'))