2424ubuntu_firefox_ua_string = 'Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:15.0) Gecko/20100101 Firefox/15.0.1'
2525google_bot_ua_string = 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)'
2626nokia_n97_ua_string = 'Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/12.0.024; Profile/MIDP-2.1 Configuration/CLDC-1.1; en-us) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.12344'
27+ android_firefox_aurora_ua_string = 'Mozilla/5.0 (Android; Mobile; rv:27.0) Gecko/27.0 Firefox/27.0'
2728
2829iphone_ua = parse (iphone_ua_string )
2930ipad_ua = parse (ipad_ua_string )
4546ubuntu_firefox_ua = parse (ubuntu_firefox_ua_string )
4647google_bot_ua = parse (google_bot_ua_string )
4748nokia_n97_ua = parse (nokia_n97_ua_string )
49+ android_firefox_aurora_ua = parse (android_firefox_aurora_ua_string )
4850
4951
5052class UserAgentsTest (unittest .TestCase ):
@@ -90,6 +92,7 @@ def test_is_tablet_property(self):
9092 self .assertTrue (playbook_ua .is_tablet )
9193 self .assertTrue (kindle_fire_ua .is_tablet )
9294 self .assertTrue (nexus_7_ua .is_tablet )
95+ self .assertFalse (android_firefox_aurora_ua .is_tablet )
9396
9497 def test_is_mobile_property (self ):
9598 self .assertTrue (iphone_ua .is_mobile )
@@ -110,6 +113,7 @@ def test_is_mobile_property(self):
110113 self .assertFalse (windows_ie_ua .is_mobile )
111114 self .assertFalse (ubuntu_firefox_ua .is_mobile )
112115 self .assertFalse (google_bot_ua .is_mobile )
116+ self .assertTrue (android_firefox_aurora_ua .is_mobile )
113117
114118 def test_is_touch_property (self ):
115119 self .assertTrue (iphone_ua .is_touch_capable )
@@ -130,6 +134,7 @@ def test_is_touch_property(self):
130134 self .assertFalse (ubuntu_firefox_ua .is_touch_capable )
131135 self .assertFalse (google_bot_ua .is_touch_capable )
132136 self .assertFalse (nokia_n97_ua .is_touch_capable )
137+ self .assertTrue (android_firefox_aurora_ua .is_touch_capable )
133138
134139 def test_is_pc (self ):
135140 self .assertFalse (iphone_ua .is_pc )
@@ -150,6 +155,7 @@ def test_is_pc(self):
150155 self .assertTrue (ubuntu_firefox_ua .is_pc )
151156 self .assertTrue (ie_touch_ua .is_pc )
152157 self .assertTrue (ie_ua .is_pc )
158+ self .assertFalse (android_firefox_aurora_ua .is_pc )
153159
154160 def test_is_bot (self ):
155161 self .assertTrue (google_bot_ua .is_bot )
@@ -170,3 +176,4 @@ def test_is_bot(self):
170176 self .assertFalse (ie_touch_ua .is_bot )
171177 self .assertFalse (ie_ua .is_bot )
172178 self .assertFalse (nokia_n97_ua .is_bot )
179+ self .assertFalse (android_firefox_aurora_ua .is_bot )
0 commit comments