Description: mock time_ns
 patch with upstream commit 7cdfcf95f9a335a17a7c2039cdd642177a81eb49
 on file tests/test_stdlib_formatter.py
 .
Author: Karsten Schöke <karsten.schoeke@geobasis-bb.de>
Origin: upstream, commit: 7cdfcf95f9a335a17a7c2039cdd642177a81eb49
Bug: https://github.com/elastic/ecs-logging-python/issues/158
Forwarded: not-needed
Last-Update: 2025-02-26
---

--- python-ecs-logging-2.2.0.orig/tests/test_stdlib_formatter.py
+++ python-ecs-logging-2.2.0/tests/test_stdlib_formatter.py
@@ -98,10 +98,11 @@ def test_can_be_set_on_handler():
         '"name":"file.py"},"function":"test_function"},"original":"1: hello"}}\n'
     )
 
-
+@mock.patch("time.time_ns")
 @mock.patch("time.time")
-def test_extra_is_merged(time, logger):
+def test_extra_is_merged(time, time_ns, logger):
     time.return_value = 1584720997.187709
+    time_ns.return_value = time.return_value * 1_000_000_000
 
     stream = StringIO()
     handler = logging.StreamHandler(stream)
