Skip to content

Commit 72e58c6

Browse files
committed
Made page view test consistent with other tests
1 parent 39b4ca1 commit 72e58c6

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

snowplow_tracker/test/integration/test_integration.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,16 @@ class IntegrationTest(unittest.TestCase):
6060
def test_integration_page_view(self):
6161
t = tracker.Tracker(default_consumer, default_subject)
6262
with HTTMock(pass_response_content):
63-
t.track_page_view("http://savethearctic.org", "Save The Arctic", None)
64-
self.assertEquals(from_querystring("page", querystrings[-1]),"Save+The+Arctic")
63+
t.track_page_view("http://savethearctic.org", "Save The Arctic", "http://referrer.com")
64+
expected_fields = {"e": "pv", "page": "Save+The+Arctic", "url": "http%3A%2F%2Fsavethearctic.org", "refr": "http%3A%2F%2Freferrer.com"}
65+
for key in expected_fields:
66+
self.assertEquals(from_querystring(key, querystrings[-1]), expected_fields[key])
6567

6668
def test_integration_ecommerce_transaction_item(self):
6769
t = tracker.Tracker(default_consumer, default_subject)
6870
with HTTMock(pass_response_content):
6971
t.track_ecommerce_transaction_item("12345", "pbz0025", 7.99, 2, "black-tarot", "tarot", currency="GBP")
70-
expected_fields = {"ti_ca": "tarot", "ti_id": "12345", "ti_qu": "2", "ti_sk": "pbz0025", "e": "ti", "ti_nm": "black-tarot", "ti_pr": "7.99", "ti_cu": "GBP"}
72+
expected_fields = {"ti_ca": "tarot", "ti_id": "12345", "ti_qu": "2", "ti_sk": "pbz0025", "e": "ti", "ti_nm": "black-tarot", "ti_pr": "7.99", "ti_cu": "GBP"}
7173
for key in expected_fields:
7274
self.assertEquals(from_querystring(key, querystrings[-1]), expected_fields[key])
7375

0 commit comments

Comments
 (0)