Skip to content

Commit 20c7036

Browse files
author
Derrick Petzold
committed
Added test for Samsung I8190 Galaxy S III mini.
Added test for Samsung Galaxy S5. Added test for Nexus 5.
1 parent 01e1534 commit 20c7036

2 files changed

Lines changed: 30 additions & 2 deletions

File tree

‎user_agents/devices.json‎

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,15 @@
125125
"ua_string": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2",
126126
"str": "PC / Mac OS X 10.6.8 / WebKit Nightly 537.13"
127127
},
128+
"nexus_5": {
129+
"is_bot": false,
130+
"is_mobile": true,
131+
"is_pc": false,
132+
"is_tablet": false,
133+
"is_touch_capable": true,
134+
"ua_string": "Mozilla/5.0 (Linux; Android 4.4.4; Nexus 5 Build/KTU84P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.117 Mobile Safari/537.36",
135+
"str": "Nexus 5 / Android 4.4.4 / Chrome Mobile 37.0.2062"
136+
},
128137
"nexus_7": {
129138
"is_bot": false,
130139
"is_mobile": false,
@@ -178,7 +187,25 @@
178187
"ua_string": "Mozilla/5.0 (Linux; Android 4.4.2; en-us; SAMSUNG SCH-I545 Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.5 Chrome/28.0.1500.94 Mobile Safari/537.36",
179188
"str": "SAMSUNG SCH-I545 / Android 4.4.2 / Chrome Mobile 28.0.1500"
180189
},
181-
"samsung_gt": {
190+
"samsung_galaxy_s_iii_mini": {
191+
"is_bot": false,
192+
"is_mobile": true,
193+
"is_pc": false,
194+
"is_tablet": false,
195+
"is_touch_capable": true,
196+
"ua_string": "Mozilla/5.0 (Linux; Android 4.1.2; GT-I8190 Build/JZO54K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.117 Mobile Safari/537.36",
197+
"str": "GT-I8190 / Android 4.1.2 / Chrome Mobile 37.0.2062"
198+
},
199+
"samsung_sm_galaxy_s5": {
200+
"is_bot": false,
201+
"is_mobile": true,
202+
"is_pc": false,
203+
"is_tablet": false,
204+
"is_touch_capable": true,
205+
"ua_string": "Mozilla/5.0 (Linux; Android 4.4.2; en-gb; SAMSUNG SM-G900F Build/KOT49H) AppleWebKit/537.36 (KHTML, like Gecko) Version/1.6 Chrome/28.0.1500.94 Mobile Safari/537.36",
206+
"str": "SAMSUNG SM-G900F / Android 4.4.2 / Chrome Mobile 28.0.1500"
207+
},
208+
"samsung_wave_ii": {
182209
"is_bot": false,
183210
"is_mobile": true,
184211
"is_pc": false,

‎user_agents/tests.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def test_func(self):
5656
attrs = ('is_bot', 'is_mobile',
5757
'is_pc', 'is_tablet', 'is_touch_capable')
5858
for attr in attrs:
59-
self.assertEqual(getattr(items['user_agent'], attr), items[attr])
59+
self.assertEqual(
60+
getattr(items['user_agent'], attr), items[attr], msg=attr)
6061
self.assertEqual(str(items['user_agent']), items['str'])
6162
return test_func
6263

0 commit comments

Comments
 (0)