File size: 684 Bytes
ee9e25e
 
 
513e813
 
ee9e25e
 
 
 
 
 
 
 
 
 
 
 
513e813
 
 
 
 
ee9e25e
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import unittest
from details_data_processor import DetailsDataProcessor
import pandas as pd
import requests
import os

class TestDetailsDataProcessor(unittest.TestCase):

    def setUp(self):
        self.processor = DetailsDataProcessor()

    # check that the result is a pandas dataframe
    def test_process_data(self):
        pass
        # data = self.processor.data
        # self.assertIsInstance(data, pd.DataFrame)

    def test_download_file(self):
        DetailsDataProcessor._download_file('https://www.google.com', 'test.html')
        self.assertTrue(os.path.exists('test.html'))
        os.remove('test.html')

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