def setTestDetails(self): from ooni import __version__ as software_version input_file_hashes = [] for input_file in self.inputFiles: input_file_hashes.append(input_file['hash']) options = sanitize_options(self.options) self.testDetails = { 'test_start_time': otime.timestampNowLongUTC(), 'probe_asn': config.probe_ip.geodata['asn'], 'probe_cc': config.probe_ip.geodata['countrycode'], 'probe_ip': config.probe_ip.geodata['ip'], 'probe_city': config.probe_ip.geodata['city'], 'test_name': self.testName, 'test_version': self.testVersion, 'software_name': 'ooniprobe', 'software_version': software_version, 'options': options, 'input_hashes': input_file_hashes, 'report_id': self.reportID, 'test_helpers': self.testHelpers, 'annotations': self.annotations, 'data_format_version': '0.2.0' }
def getTestDetails(self): return { 'probe_asn': config.probe_ip.geodata['asn'], 'probe_cc': config.probe_ip.geodata['countrycode'], 'probe_ip': config.probe_ip.geodata['ip'], 'probe_city': config.probe_ip.geodata['city'], 'software_name': 'ooniprobe', 'software_version': ooniprobe_version, 'options': sanitize_options(self.options), 'annotations': self.annotations, 'data_format_version': '0.2.0', 'test_name': self.testName, 'test_version': self.testVersion, 'test_helpers': self.testHelpers, 'test_start_time': otime.timestampNowLongUTC(), 'input_hashes': [input_file['hash'] for input_file in self.inputFiles], 'report_id': self.reportId }
def getTestDetails(self): return { 'probe_asn': probe_ip.geodata['asn'], 'probe_cc': probe_ip.geodata['countrycode'], 'probe_ip': probe_ip.geodata['ip'], 'probe_city': probe_ip.geodata['city'], 'software_name': 'ooniprobe', 'software_version': ooniprobe_version, # XXX only sanitize the input files 'options': sanitize_options(self.options), 'annotations': self.annotations, 'data_format_version': '0.2.0', 'test_name': self.testName, 'test_version': self.testVersion, 'test_helpers': self.testHelpers, 'test_start_time': otime.timestampNowLongUTC(), # XXX We should deprecate this key very soon 'input_hashes': [], 'report_id': self.reportId }
def getTestDetails(self): return { "probe_asn": probe_ip.geodata["asn"], "probe_cc": probe_ip.geodata["countrycode"], "probe_ip": probe_ip.geodata["ip"], "probe_city": probe_ip.geodata["city"], "software_name": "ooniprobe", "software_version": ooniprobe_version, # XXX only sanitize the input files "options": sanitize_options(self.options), "annotations": self.annotations, "data_format_version": "0.2.0", "test_name": self.testName, "test_version": self.testVersion, "test_helpers": self.testHelpers, "test_start_time": otime.timestampNowLongUTC(), # XXX We should deprecate this key very soon "input_hashes": [], "report_id": self.reportId, }
def run(self): if 'measurement_start_time' not in self.testInstance.report.keys(): self.testInstance.report[ 'measurement_start_time'] = otime.timestampNowLongUTC() return self.netTestMethod()
def run(self): if 'measurement_start_time' not in self.testInstance.report.keys(): self.testInstance.report['measurement_start_time'] = otime.timestampNowLongUTC() if not hasattr(self.testInstance, '_start_time'): self.testInstance._start_time = time.time() return self.netTestMethod()