aboutsummaryrefslogtreecommitdiff
path: root/tests/models/test_device.py
diff options
context:
space:
mode:
authorMax Nanis2026-08-26 16:46:45 -0700
committerMax Nanis2026-08-26 16:46:45 -0700
commitcf239865ce440e1a71ee2360514eaeb018620ac9 (patch)
tree1fefff4a0bbf10df6431e541aa5a3ff5e76f0663 /tests/models/test_device.py
parent47ea200eac0eaa7bef02f6ebb05de9afad5ee0d7 (diff)
downloadgeneralresearch-cf239865ce440e1a71ee2360514eaeb018620ac9.tar.gz
generalresearch-cf239865ce440e1a71ee2360514eaeb018620ac9.zip
Ruff afternoon!
Diffstat (limited to 'tests/models/test_device.py')
-rw-r--r--tests/models/test_device.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/models/test_device.py b/tests/models/test_device.py
index bf72c81..8e1251a 100644
--- a/tests/models/test_device.py
+++ b/tests/models/test_device.py
@@ -1,3 +1,5 @@
+from __future__ import annotations
+
iphone_ua_string = (
"Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) "
"Version/5.1 Mobile/9B179 Safari/7534.48.3"
@@ -13,10 +15,12 @@ chromebook_ua_string = (
)
+from generalresearch.models import DeviceType
+from generalresearch.models.device import parse_device_from_useragent
+
+
class TestDeviceUA:
def test_device_ua(self):
- from generalresearch.models import DeviceType
- from generalresearch.models.device import parse_device_from_useragent
assert parse_device_from_useragent(iphone_ua_string) == DeviceType.MOBILE
assert parse_device_from_useragent(ipad_ua_string) == DeviceType.TABLET