def test_ope(self):
     fich = os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                         'log', "1402954705000.log")
     ele = lecture_plist.collection_datas_decodes(fich)
     self.compare(ele.datemaj, datetime.datetime(2014, 6, 16, 21, 38, 25, tzinfo=tz.utc))
     el = ele.list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.action, 'c')
     self.compare(el.sens_element, 'd')
     self.compare(el.is_ope, True)
     self.compare(el.is_cat, False)
     self.compare(el.is_compte, False)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 16, 21, 38, 25, tzinfo=tz.utc))
     self.compare(el.id, 66)
     self.compare(el.cat, 1)
     self.compare(el.automatique, False)
     self.compare(el.date, datetime.date(2014, 6, 16))
     self.compare(el.montant, -10.25)
     self.compare(el.tiers, 'Ope standart')
     self.compare(el.__str__(), "(66) le 16/06/2014 : -10.25 EUR tiers: Ope standart cpt: 1")
     ele = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403036267000.log"))
     self.compare(ele.datemaj, datetime.datetime(2014, 6, 17, 20, 17, 47, tzinfo=tz.utc))
     el = ele.list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.action, 'm')
     self.compare(el.sens_element, 'd')
     self.compare(el.is_ope, True)
     self.compare(el.is_cat, False)
     self.compare(el.is_compte, False)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 20, 17, 47, 95470, tzinfo=tz.utc))
     self.compare(el.id, 66)
     self.compare(el.cat, 1)
     self.compare(el.automatique, False)
     self.compare(el.date, datetime.date(2014, 6, 16))
     self.compare(el.montant, -55)
     self.compare(el.tiers, 'Ope standart')
     ele = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403037219000.log"))
     self.compare(ele.datemaj, datetime.datetime(2014, 6, 17, 20, 33, 39, tzinfo=tz.utc))
     el = ele.list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.action, 'd')
     self.compare(el.sens_element, 'd')
     self.compare(el.is_ope, True)
     self.compare(el.is_cat, False)
     self.compare(el.is_compte, False)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 20, 17, 47, 95470, tzinfo=tz.utc))
     self.compare(el.id, 66)
     self.compare(el.cat, 1)
     self.compare(el.automatique, False)
     self.compare(el.date, datetime.date(2014, 6, 16))
     self.compare(el.montant, -55)
     self.compare(el.tiers, 'Ope standart')
 def test_element_cat(self):
     el = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403049014000.log")).list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.datemaj, datetime.datetime(2014, 6, 17, 23, 50, 14, tzinfo=tz.utc))
     self.compare(el.action, 'c')
     self.compare(el.is_ope, False)
     self.compare(el.is_cat, True)
     self.compare(el.is_compte, False)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 23, 50, 14, tzinfo=tz.utc))
     self.compare(el.id, 16)
     self.compare(el.couleur, '#000000')
     self.compare(el.nom, " ")
     self.compare(el.type_cat, "d")
     el = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403049014010.log")).list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.datemaj, datetime.datetime(2014, 6, 17, 23, 50, 14, 10000, tzinfo=tz.utc))
     self.compare(el.action, 'm')
     self.compare(el.is_ope, False)
     self.compare(el.is_cat, True)
     self.compare(el.is_compte, False)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 23, 50, 14, 10000, tzinfo=tz.utc))
     self.compare(el.id, 16)
     self.compare(el.couleur, '#000000')
     self.compare(el.nom, "Cat aded")
     self.compare(el.type_cat, "d")
     self.compare(el.__str__(), "(16) 'Cat aded' type:d")
     el = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403049014020.log")).list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.datemaj,  datetime.datetime(2014, 6, 17, 23, 50, 14, 20000, tzinfo=tz.utc))
     self.compare(el.action, 'd')
     self.compare(el.is_ope, False)
     self.compare(el.is_cat, True)
     self.compare(el.is_compte, False)
     self.compare(el.is_budget, False)
     self.compare(el.lastup,  datetime.datetime(2014, 6, 17, 23, 50, 14, 10000, tzinfo=tz.utc))
     self.compare(el.id, 16)
     self.compare(el.couleur, '#000000')
     self.compare(el.nom, "Cat aded")
     self.compare(el.type_cat, "d")
 def test_compte(self):
     el = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403040634000.log")).list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.datemaj, datetime.datetime(2014, 6, 17, 21, 30, 34, tzinfo=tz.utc))
     self.compare(el.action, 'c')
     self.compare(el.is_ope, False)
     self.compare(el.is_cat, False)
     self.compare(el.is_compte, True)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 21, 30, 34, tzinfo=tz.utc))
     self.compare(el.id, 7)
     self.compare(el.couleur, "#000000")
     self.compare(el.nom, " ")
     el = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403040635000.log")).list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.datemaj, datetime.datetime(2014, 6, 17, 21, 30, 35, tzinfo=tz.utc))
     self.compare(el.action, 'm')
     self.compare(el.is_ope, False)
     self.compare(el.is_cat, False)
     self.compare(el.is_compte, True)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 21, 30, 34, 88255, tzinfo=tz.utc))
     self.compare(el.id, 7)
     self.compare(el.couleur, '#000000')
     self.compare(el.nom, "Ghh")
     self.compare(el.__str__(), "(7) 'Ghh'")
     el = lecture_plist.collection_datas_decodes(
         os.path.join(settings.PROJECT_PATH, "gsb", "test_files", "import_plist", 'Applications', 'Money Journal',
                      'log', "1403045414000.log")).list_el[0]
     self.compare(el.device, 'MyHpyVfqnK')
     self.compare(el.datemaj, datetime.datetime(2014, 6, 17, 22, 50, 14, tzinfo=tz.utc))
     self.compare(el.action, 'd')
     self.compare(el.is_ope, False)
     self.compare(el.is_cat, False)
     self.compare(el.is_compte, True)
     self.compare(el.is_budget, False)
     self.compare(el.lastup, datetime.datetime(2014, 6, 17, 21, 30, 34, 88255, tzinfo=tz.utc))
     self.compare(el.id, 7)
     self.compare(el.couleur, "#000000")
     self.compare(el.nom, "Ghh")