Skip to content

Commit b6fcaad

Browse files
committed
Fix tests
1 parent 85d8ce6 commit b6fcaad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/logs/test_rp_log_handler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,8 @@
1010
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1111
# See the License for the specific language governing permissions and
1212
# limitations under the License
13-
import re
1413

15-
# noinspection PyUnresolvedReferences
14+
from datetime import datetime
1615
from unittest import mock
1716

1817
# noinspection PyPackageRequirements
@@ -68,7 +67,8 @@ def test_emit_simple(mocked_handle):
6867
call_args = mock_client.log.call_args[0]
6968
call_kwargs = mock_client.log.call_args[1]
7069

71-
assert re.match("^[0-9]+$", call_args[0])
70+
log_time = call_args[0]
71+
assert isinstance(log_time, datetime)
7272
assert test_message == call_args[1]
7373
assert call_kwargs["level"] == "INFO"
7474
assert not call_kwargs["attachment"]

0 commit comments

Comments
 (0)