"""
------------------------------------------------------------------------------
--                                                                          --
--                                 LAB 07                                   --
--                                                                          --
--                       L A B 0 5 _ T E S T S . P Y                        --
--                                                                          --
------------------------------------------------------------------------------
-- <Your Name Here>                                                         --
--                                                                          --
-- <Class Name Here>                                                        --
--                                                                          --
------------------------------------------------------------------------------
-- This file contains unit tests for the functions in module lab07.         --
--                                                                          --
------------------------------------------------------------------------------
"""

from lab07 import *
import unittest

class TestLabSeven(unittest.TestCase):
    def test_make_FF7save(self):
        str1 = 'Level : 25;Name : Cloud;HP : 976/976;MP : 85/85;Characters : Cloud, Aerith & Cid;Gil : 54916;Location : "Costa Del Sol"'
        str2 = 'Level : 57;Name : Cid;HP : 5198/5274;MP : 497/497;Characters : Cid, Cloud & Yuffie;Gil : 1238699;Location : "Midgar Area"'
        str3 = 'Level : 10;Name : Aerith;HP : 105/110;MP : 32/42;Characters : Aerith, Cloud;Gil : 1686;Location : "Wall Market"'

        self.assertEqual(unicode(FF7Save(str1)), 'Cloud,25,976,976,85,85,Cloud,Aerith,Cid,54916,"Costa Del Sol"')
        self.assertEqual(unicode(FF7Save(str2)), 'Cid,57,5198,5274,497,497,Cid,Cloud,Yuffie,1238699,"Midgar Area"')
        self.assertEqual(unicode(FF7Save(str3)), 'Aerith,10,105,110,32,42,Aerith,Cloud,No one,1686,"Wall Market"')

if __name__ == '__main__':
    unittest.main()
