in reply to Re^7: Testing with Test::Mock::HTTP::Tiny
in thread Testing with Test::Mock::HTTP::Tiny
I don't know what goes on in WWW::Crawl
This is now on GitHub
2) save it to Mock module with different domain B (how???)
I took the data from the domain and replaced the domain this data came from "https://www.onradar.uk" 1 with the test domain "https://www.testing.crawl" using a simple search and replace. The replacement also changed the email domain in the page source but that's probably not relevant.
1 - I've changed from using "www.way-finder.uk" in the original question to using "www.onradar.uk" now because the amount of data returned in the HTML source is smaller.
Oh, in all my tests above I never changed the domain.
I've changed the domain to one that doesn't exist on t'interweb so I can be sure the test code is using the mocked data and not going off and fetching a fresh page.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Testing with Test::Mock::HTTP::Tiny
by afoken (Chancellor) on Sep 29, 2023 at 21:57 UTC | |
by Bod (Parson) on Sep 30, 2023 at 00:05 UTC |