Example #1
0
async def webhook_reciver(request):
    obj = DataProvider(dropbox['token'], path)
    obj.get_newest_monefy_data()
    data = validator_data.validate_data(obj.download_path)
    if data:
        mapper.insert_transactions(data)
    return json({"message": "updated"}, status=200)
Example #2
0
 def setUp(self):
     self.classObj = DataProvider('TOKEN', '', '/', 'manual')
Example #3
0
 def test_invalid_token_input(self):
     with self.assertRaises(AssertionError):
         self.classObj = DataProvider('')
Example #4
0
 def test_invalid_mode_input(self):
     with self.assertRaises(AssertionError):
         self.classObj = DataProvider('TOKEN', '', '/valid', 'invalid')
Example #5
0
 def test_invalid_working_directory_input(self):
     with self.assertRaises(AssertionError):
         self.classObj = DataProvider('TOKEN', '', 'invalid')
Example #6
0
 def test_invalid_working_directory_type(self):
     with self.assertRaises(AttributeError):
         self.classObj = DataProvider('TOKEN', '', 1)
Example #7
0
 def test_invalid_download_path_type(self):
     with self.assertRaises(AssertionError):
         self.classObj = DataProvider('TOKEN', 1)
Example #8
0
 def test_invalid_token_type(self):
     with self.assertRaises(TypeError):
         self.classObj = DataProvider(1)