Exemplo n.º 1
0
	def test_hasBiKeysA2(self):
		hdDevice = HDDevice()
		headers = {
			'x-wap-profile' : 'http://www-ccpp.tcl-ta.com/files/ALCATEL_one_touch_908.xml'
		}
		result = hdDevice.hasBiKeys(headers)
		self.assertFalse(result)
Exemplo n.º 2
0
	def test_hasBiKeysA(self):
		hdDevice = HDDevice()
		headers = {
			'user-agent' : 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3 like Mac OS X; en-gb) AppleWebKit/533.17.9 (KHTML, like Gecko)'
		}
		result = hdDevice.hasBiKeys(headers)
		self.assertFalse(result)
Exemplo n.º 3
0
 def __init__(self, configFile=None):
     self._Store = HDStore()
     self._Device = HDDevice()
     if configFile is not None:
         self.readConfig(configFile)
     elif os.path.isfile(self.configFile):
         self.readConfig(self.configFile)
Exemplo n.º 4
0
	def test_hasBiKeysD(self):
		hdDevice = HDDevice()
		headers = {
			'devicemanufacturer' : 'Sony',
			'devicename': 'Tablet 500s'
		}
		result = hdDevice.hasBiKeys(headers)
		self.assertIsNotNone(result)
Exemplo n.º 5
0
	def test_hasBiKeysC(self):
		hdDevice = HDDevice()
		headers = {
			'utsname.brand' : 'Apple',
			'utsname.machine': 'iMac 9,1'
		}
		result = hdDevice.hasBiKeys(headers)
		self.assertIsNotNone(result)
Exemplo n.º 6
0
	def test_hasBiKeysB(self):
		hdDevice = HDDevice()
		headers = {
			'ro.product.brand' : 'Samsung',
			'ro.product.model': 'GT-I9500'
		}
		result = hdDevice.hasBiKeys(headers)
		self.assertIsNotNone(result)
Exemplo n.º 7
0
	def test_isHelperUsefulB(self):
		headers = {
			'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'
		}

		hdDevice = HDDevice()
		result = hdDevice.isHelperUseful(headers)
		self.assertFalse(result)
Exemplo n.º 8
0
	def test_isHelperUsefulA(self):
		headers = {
			'User-Agent': 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_3 like Mac OS X; en-gb) AppleWebKit/533.17.9 (KHTML, like Gecko)'
		}
		hdDevice = HDDevice()


		result = hdDevice.isHelperUseful(headers)
		self.assertTrue(result)