Example #1
0
 def setUp(self):
     set_up(self)
     amazon.Request = Mock()
     amazon.urlopen().read = Mock(return_value=reviewers_table)
     product = Product('http://fake')
     product._number_of_review_pages = Mock(return_value=2)
     self.product = product
Example #2
0
 def setUp(self):
     set_up(self)
     amazon.Request = Mock()
     amazon.urlopen().read = Mock(return_value=reviewers_table)
     product = Product('http://fake')
     product._number_of_review_pages = Mock(return_value=2)
     self.product = product
Example #3
0
 def setUp(self):
     set_up(self)
     amazon.Request = Mock()
     amazon.urlopen().read = Mock(return_value=reviewers_table)
Example #4
0
 def test_number_of_pages_on_html_string_five_pages(self):
     amazon.urlopen().read = Mock(return_value=five_pages)
     number = Product(self.url)._number_of_review_pages(1)
     self.assertEqual(number, 5)
Example #5
0
 def setUp(self):
     set_up(self)
     amazon.Request = Mock()
     amazon.urlopen().read = Mock(return_value=reviewers_table)
Example #6
0
 def test_number_of_pages_on_html_string_five_pages(self):
     amazon.urlopen().read = Mock(return_value=five_pages)
     number = Product(self.url)._number_of_review_pages(1)
     self.assertEqual(number, 5)