Skip to content

Commit

Permalink
Couple of tweaks to improve tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyb3r-Jak3 committed Sep 6, 2020
1 parent cc15335 commit 431ff84
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions haralyzer/http.py
Expand Up @@ -22,10 +22,6 @@ def bodySize(self):
def cookies(self):
return self.raw_entry["cookies"]

@cached_property
def headers(self):
return self.raw_entry["headers"]

@cached_property
def headersSize(self):
return self.raw_entry["headersSize"]
Expand Down Expand Up @@ -82,10 +78,6 @@ class Response(HttpTransaction):
def bodySize(self):
return self.raw_entry["bodySize"]

@cached_property
def headers(self):
return self.raw_entry["headers"]

@cached_property
def headersSize(self):
return self.raw_entry["headersSize"]
Expand Down
3 changes: 2 additions & 1 deletion tests/test_page.py
Expand Up @@ -19,11 +19,12 @@ def test_init(har_data):

# Throws PageNotFoundException with bad page ID
with pytest.raises(PageNotFoundError):
page = HarPage(BAD_PAGE_ID, har_data=init_data)
assert HarPage(BAD_PAGE_ID, har_data=init_data)

# Make sure it can load with either har_data or a parser
page = HarPage(PAGE_ID, har_data=init_data)
assert isinstance(page, HarPage)
assert repr(page) == "ID: page_3, URL: http://humanssuck.net/"
parser = HarParser(init_data)
page = HarPage(PAGE_ID, har_parser=parser)
assert isinstance(page, HarPage)
Expand Down

0 comments on commit 431ff84

Please sign in to comment.