Skip to content

Commit

Permalink
use fake domain in excavate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechromancer committed Nov 16, 2023
1 parent 2fb0162 commit 0297e2c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bbot/test/test_step_2/module_tests/test_module_excavate.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ def check(self, module_test, events):


class TestExcavateCSP(TestExcavate):
csp_test_header = "default-src 'self'; script-src fake.domain.com; object-src 'none';"
csp_test_header = "default-src 'self'; script-src test.asdf.fakedomain; object-src 'none';"

async def setup_before_prep(self, module_test):
expect_args = {"method": "GET", "uri": "/"}
respond_args = {"headers": {"Content-Security-Policy": self.csp_test_header}}
module_test.set_expect_requests(expect_args=expect_args, respond_args=respond_args)

def check(self, module_test, events):
assert any(e.data == "fake.domain.com" for e in events)
assert any(e.data == "test.asdf.fakedomain" for e in events)

0 comments on commit 0297e2c

Please sign in to comment.