Fix Scrape integration for date and timestamp devices (#84480)

* Scrape integration fix for date and timestamp devices

* Changes advised by PR review. Merged test source and used walrus operator
This commit is contained in:
Jonno12345 2022-12-28 09:16:14 +00:00 committed by GitHub
parent 2bcf9717ed
commit 5e04a87cc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 130 additions and 5 deletions

View file

@ -103,6 +103,9 @@ class MockRestData:
"<h1>Current Version: 2021.12.10</h1>Released: <span class='release-date'>January 17, 2022</span>"
"<div class='links' style='links'><a href='/latest-release-notes/'>Release notes</a></div></div>"
"<template>Trying to get</template>"
"<div class='current-time'>"
"<h1>Current Time:</h1><span class='utc-time'>2022-12-22T13:15:30Z</span>"
"</div>"
)
if self.payload == "test_scrape_sensor2":
self.data = (