Exemplo n.º 1
0
 def test_num_pins(self):
     dict_sample_config = {
             "stock_dir": self.base_path,
             "smtp_server":"mail.example.com",
             "email":"*****@*****.**",
             "password":"******",
             "interval_min":40,
             "daily_send_hour": datetime.time(18,00),
             "weekly_send_hour": datetime.time(8,00),
             "weekly_send_day": 4,
             "min_pines": {
                 "jazztel (activado)":100,
                 "orange":20,
                 "tarjetalia":10
                 }
             }
     pintrck = Pintracker(dict_sample_config)
     for file in self.expected_results.iterkeys():
         pines_file_path = os.path.join(self.base_path, file)
         pines_leidos = pintrck.numero_pines(pines_file_path)
         self.assertEqual(self.expected_results[file], pines_leidos)