Пример #1
0
 def test_update_obj(self):
     logging.debug('hello')
     netflix_obj = netflix.make_netflix()
     _select_result('Haunt', netflix_obj)
     title = netflix_obj.update_object_info({'title': 'Serenity'}, netflix.CSS_INFO_TITLE)
     logging.debug(title)
     netflix_obj.close_browser()
Пример #2
0
 def test_update_check_availability(self):
     logging.debug('hello')
     netflix_obj = netflix.make_netflix()
     _select_result('Haunt', netflix_obj)
     title = netflix_obj.update_object_info({'title': 'Haunt'}, netflix.CSS_INFO_TITLE)
     logging.debug(title)
     logging.debug(netflix_obj.check_availability(title))
     netflix_obj.exit()
Пример #3
0
 def test_go_to_result(self):
     netflix_obj = netflix.make_netflix()
     netflix_obj.login()
     self.assertTrue(netflix_obj.go_to_title('Serenity'))
     self.assertTrue(netflix_obj.go_to_title('Mike Wallace Is Here'))
     self.assertTrue(netflix_obj.go_to_title('10 Minutes Gone'))
     self.assertTrue(netflix_obj.go_to_title('Them That Follow'))
     netflix_obj.exit()
Пример #4
0
 def test_update_title(self):
     netflix_o = netflix.make_netflix()
     title = {'title': 'Luce', 'box-office': '0.9M'}
     self.assertEqual(netflix_o.update_title(title), 'blue')
     self.assertEqual(title['rating'], 'R')
     logging.debug(title)
     title2 = {'title': 'Warrior'}
     self.assertEqual(netflix_o.update_title(title2), 'red')
     logging.debug(title2)
     netflix_o.exit()
Пример #5
0
 def test_netflix_info(self):
     netflix_obj = netflix.make_netflix()
     netflix_obj.login()
     title = {'title': 'Serenity'}
     title2 = {'title': 'Them That Follow'}
     title3 = {'title': 'Nova: Life On Earth'}
     netflix_obj.netflix_info(title)
     netflix_obj.netflix_info(title2)
     netflix_obj.netflix_info(title3)
     netflix_obj.exit()
Пример #6
0
def netflix_find_title(title):
    netflix_obj = netflix.make_netflix()
    netflix_obj.login()
    netflix_obj.search(title)
    results = netflix_obj.get_resulting_list(netflix.CSS_INFO_SEARCH_LIST)
    print(results)
    # Todo; Use indexes of the result array to know which one to click
    # if you find and exact matching title just go for it
    # if no exact but similar title and right year, then we'll have to
    # find a way to verify, perhaps we'll send a request to
    # videoETA to ask for cast?

#main:
# eta_text_report(DATE2)
#netflix_find_title('Haunt')

#print('finished testing')

# very important for redbox
# Redbox started showing popups so it is better to find right title in
# netflix and go directly to link, instead of searching
Пример #7
0
 def test_log_out(self):
     netflix_o = netflix.make_netflix()
     netflix_o.login()
     netflix_o.exit()
Пример #8
0
 def test_check_availability(self):
     title = {'title': 'Haunt'}
     netflix_obj = netflix.make_netflix()
     _select_result('Haunt', netflix_obj) # find out if this title has add to queue
     logging.debug(netflix_obj.check_availability(title))
     netflix_obj.close_browser()
Пример #9
0
 def test_select_result(self):
     netflix_obj = netflix.make_netflix()
     _select_result('Haunt', netflix_obj)
     netflix_obj.exit()
Пример #10
0
 def test_login(self):
     netflix_obj = netflix.make_netflix()
     netflix_obj.login()
Пример #11
0
 def __init__(self,
              redbox_o=redbox.make_redbox(),
              netflix_o=netflix.make_netflix()):
     self.redbox = redbox_o
     self.netflix = netflix_o
     self.setup()