Пример #1
0
	def test_file_import_window(self):
		try:
			from .gui import FileImportWindow
		except SystemError:
			from gui import FileImportWindow
		
		test_networks = networks()
		file_import_window = FileImportWindow(test_networks, print)
		file_import_window.create_file_chooser('file')
		file_import_window.create_file_chooser('dir')
		file_import_window.add_file('foo.bar')
		file_import_window.on_remove_file(None, 'foo.bar')
		file_import_window.add_file('foo.bar')
		file_import_window.add_file('kismet.netxml')
		file_import_window.add_file('kismet.csv')
		file_import_window.add_file('kismon.json')
		file_import_window.on_start(None)
		file_import_window.parse_file()
		file_import_window.parse_file()
		file_import_window.parse_file()
		file_import_window.on_close(None)
Пример #2
0
	def test_file_import_window(self):
		try:
			from .gui import FileImportWindow
		except SystemError:
			from gui import FileImportWindow
		
		test_networks = networks()
		file_import_window = FileImportWindow(test_networks, print)
		file_import_window.create_file_chooser('file')
		file_import_window.create_file_chooser('dir')
		file_import_window.add_file('foo.bar')
		file_import_window.on_remove_file(None, 'foo.bar')
		file_import_window.add_file('foo.bar')
		file_import_window.add_file('kismet.netxml')
		file_import_window.add_file('kismet.csv')
		file_import_window.add_file('kismon.json')
		file_import_window.on_start(None)
		file_import_window.parse_file()
		file_import_window.parse_file()
		file_import_window.parse_file()
		file_import_window.on_close(None)
Пример #3
0
def gui_file_import_window():
	test_widget = TestWidget()
	file_import_window = FileImportWindow(test_networks, main_window.networks_queue_progress)
	file_import_window.create_file_chooser("dir")
	filename = "%s%stest-networks-%s.json" % (tempfile.gettempdir(), os.sep, int(time.time()))
	test_networks.save(filename)
	file_import_window.add_file(filename)
	test_widget.text = "networks"
	file_import_window.on_filetype_changed(test_widget, filename)
	file_import_window.on_remove_file(None, filename)
	file_import_window.add_file(filename)
	file_import_window.on_start(None)
	file_import_window.parse_file()
	file_import_window.on_close(None)
Пример #4
0
def gui_file_import_window():
	test_widget = TestWidget()
	file_import_window = FileImportWindow(test_networks, main_window.networks_queue_progress)
	file_import_window.create_file_chooser("dir")
	filename = "%s%stest-networks-%s.json" % (tempfile.gettempdir(), os.sep, int(time.time()))
	test_networks.save(filename)
	file_import_window.add_file(filename)
	test_widget.text = "networks"
	file_import_window.on_filetype_changed(test_widget, filename)
	file_import_window.on_remove_file(None, filename)
	file_import_window.add_file(filename)
	file_import_window.on_start(None)
	file_import_window.parse_file()
	file_import_window.on_close(None)