Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_get_time_stamp(self):
"""
Given: No context.
When: Calling get_time_stamp().
Then: get_time_stamp() returns time stamp in proper format.
"""
# When
s = boofuzz.helpers.get_time_stamp()
# Then
six.assertRegex(self, s, r"\[\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d,\d\d\d\]")
def log_pass(self, description=""):
self._queue.append(
[
"INSERT INTO steps VALUES(?, ?, ?, ?, ?, ?);\n",
self._current_test_case_index,
"pass",
description,
b"",
helpers.get_time_stamp(),
False,
]
def log_send(self, data):
self._queue.append(
[
"INSERT INTO steps VALUES(?, ?, ?, ?, ?, ?);\n",
self._current_test_case_index,
"send",
u"",
buffer(data),
helpers.get_time_stamp(),
False,
]
def open_test_case(self, test_case_id, name, index, *args, **kwargs):
self._queue.append(["INSERT INTO cases VALUES(?, ?, ?);\n", name, index, helpers.get_time_stamp()])
self._current_test_case_index = index
def open_test_step(self, description):
self._queue.append(
[
"INSERT INTO steps VALUES(?, ?, ?, ?, ?, ?);\n",
self._current_test_case_index,
"step",
description,
b"",
helpers.get_time_stamp(),
False,
]
def log_info(self, description):
self._queue.append(
[
"INSERT INTO steps VALUES(?, ?, ?, ?, ?, ?);\n",
self._current_test_case_index,
"info",
description,
b"",
helpers.get_time_stamp(),
False,
]
def log_check(self, description):
self._queue.append(
[
"INSERT INTO steps VALUES(?, ?, ?, ?, ?, ?);\n",
self._current_test_case_index,
"check",
description,
b"",
helpers.get_time_stamp(),
False,
]
def log_recv(self, data):
self._queue.append(
[
"INSERT INTO steps VALUES(?, ?, ?, ?, ?, ?);\n",
self._current_test_case_index,
"receive",
u"",
buffer(data),
helpers.get_time_stamp(),
False,
]