Skip to content
Browse files

Renamed test file. Checked PEP 8 style guide against files.

  • Loading branch information...
1 parent b6cd3e2 commit ab9fc1d272f2d631b1329c731f60f3840342e6a1 @zachwill committed May 14, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 amazon_tests.py → tests.py
View
7 amazon_tests.py → tests.py
@@ -26,14 +26,15 @@ def test_empty_intialization_fails(self):
self.assertRaises(TypeError, Product)
def test_initialization_with_fake_url(self):
- movie = Product(self.url)
+ movie = Product(self.url)
self.assertEqual(
movie.split_url.path, ('/Inception-Two-Disc/dp/B002ZG981E/'
'ref=cm_pr_product_top'))
self.assertEqual(
movie.reviews_url.path, ('/Inception-Two-Disc/product-reviews/'
'B002ZG981E/ref=cm_pr_product_top'))
+
class TestStarReviewsUrl(unittest.TestCase):
def test_star_reviews_url_for_1_star(self):
@@ -88,14 +89,14 @@ def setUp(self):
def test_star_reviewers_for_1_star_5_page(self):
Product('http://fake')._star_reviewers(1, 5)
called_url = urlsplit(amazon.Request.call_args[0][0])
- parsed_query = parse_qs(called_url.query)
+ parsed_query = parse_qs(called_url.query)
assert 'addOneStar' in parsed_query['filterBy']
assert '5' in parsed_query['pageNumber']
def test_star_reviewers_for_3_star_2_page(self):
Product('http://fake')._star_reviewers(3, 2)
called_url = urlsplit(amazon.Request.call_args[0][0])
- parsed_query = parse_qs(called_url.query)
+ parsed_query = parse_qs(called_url.query)
assert 'addThreeStar' in parsed_query['filterBy']
assert '2' in parsed_query['pageNumber']

0 comments on commit ab9fc1d

Please sign in to comment.
Something went wrong with that request. Please try again.