コード例 #1
0
ファイル: test_pines.py プロジェクト: demula/pintracker
 def test_min_pines(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
                 }
             }
     dict_expected_result = {
             "jazztel (activado)": 85 - 100
             }
     pintrck = Pintracker(dict_sample_config)
     actual_result = pintrck.check_min_pines()
     self.assertEqual(actual_result, dict_expected_result)