Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/c/r/cryptobox-server-0.3.0/src/cryptobox/tests/test.cryptoboxtools.py   cryptobox-server(Download)
	def test_get_absolute_devicename(self):
		"""check the get_absolute_devicename function
		"""
		func = cbx_tools.get_absolute_devicename
		self.assertTrue(func(os.path.basename(self.device)) == self.device)
		self.assertTrue(func("loop0") == "/dev/loop0")
		self.assertTrue(func(os.path.devnull) == os.path.devnull)
	def test_find_major_minor_of_device(self):
		"""check the find_major_minor_of_device function
		"""
		func = cbx_tools.find_major_minor_of_device
		self.assertTrue(func(os.path.devnull) == (1, 3))
		self.assertTrue(func("/dev/nothere") is None)

src/c/r/cryptobox-server-0.3.0/src/cryptobox/tests/test.cryptobox.py   cryptobox-server(Download)
	def test_allowed_devices(self):
		'''is_device_allowed should accept permitted devices'''
		self.assertTrue(self.cb.is_device_allowed("/dev/loop1"))
		self.assertTrue(self.cb.is_device_allowed("/dev/usb/../loop1"))