def test_set_params_dates(): """ ensure ability to set date range after class instantiation """ s1 = Swepy(os.getcwd(), ul=[66, -145], lr=[73, -166]) # swe_object s1.set_login("test", "test") s1.set_dates(start=datetime.date(2010, 1, 1), end=datetime.date(2010, 1, 1)) assert s1.check_params() is True
def test_set_params_auth(): """ ensure ability to login to Earth Data """ start = datetime.date(2010, 1, 1) s1 = Swepy(os.getcwd(), ul=[66, -145], lr=[73, -166]) # swe_object s1.set_dates(start, start) s1.set_login(username="******", password="******") assert s1.check_params() is True
def test_set_params_bounds(): """ test the ability to set grid bounds after class instantiation """ start = datetime.date(2010, 1, 1) s1 = Swepy(os.getcwd()) s1.set_dates(start, start) s1.set_login("test", "test") s1.set_grid(ul=[66, -145], lr=[73, -166]) assert s1.check_params() is True
def test_check_params_true(): """ ensure check params returns true when the class is prepared to scrape files """ start = datetime.date(2010, 1, 1) ul = [66, -145] lr = [76, -166] s1 = Swepy(os.getcwd(), ul, lr) s1.set_login("test", "test") s1.set_dates(start, start) assert s1.check_params() is True