last lint

This commit is contained in:
mcguirepr89
2022-06-24 09:28:07 -04:00
parent 6ed9d5a50d
commit e3db620086
+3 -3
View File
@@ -1,6 +1,7 @@
from scripts.utils.parse_settings import config_to_settings
import tempfile
def test():
text = """LATITUDE=32.0
LONGITUDE=-73.0
@@ -32,7 +33,7 @@ DATABASE_LANG=en
LAST_RUN=
THIS_RUN=
IDFILE=/home/pi/BirdNET-Pi/IdentifiedSoFar.txt"""
filename = tempfile.NamedTemporaryFile(suffix='.txt', delete=False)
with open(filename.name, 'w', encoding='utf8', newline='') as f:
f.write(text)
@@ -40,5 +41,4 @@ IDFILE=/home/pi/BirdNET-Pi/IdentifiedSoFar.txt"""
settings = config_to_settings(filename.name)
assert(settings["APPRISE_NOTIFICATION_TITLE"] == "Bird!")
assert(settings["FULL_DISK"] == "purge")
assert(settings["OVERLAP"] == "0.0") # Yes, it's a string at this point.
assert(settings["OVERLAP"] == "0.0") # Yes, it's a string at this point.