|
8 | 8 | import urllib |
9 | 9 | from unittest import mock |
10 | 10 |
|
11 | | -import nats |
12 | 11 | import nats.errors |
13 | 12 | import pytest |
14 | | -from nats.aio.client import Client as NATS, ServerVersion, __version__ |
| 13 | +from nats.aio.client import Client as NATS |
| 14 | +from nats.aio.client import ServerVersion, __version__ |
| 15 | + |
| 16 | +import nats |
15 | 17 | from tests.utils import ( |
16 | 18 | ClusteringDiscoveryAuthTestCase, |
17 | 19 | ClusteringTestCase, |
@@ -669,9 +671,9 @@ async def next_msg(): |
669 | 671 |
|
670 | 672 | # FIXME: This message would be lost because cannot |
671 | 673 | # reuse the future from the iterator that timed out. |
672 | | - await nc.publish(f"tests.2", b"bar") |
| 674 | + await nc.publish("tests.2", b"bar") |
673 | 675 |
|
674 | | - await nc.publish(f"tests.3", b"bar") |
| 676 | + await nc.publish("tests.3", b"bar") |
675 | 677 | await nc.flush() |
676 | 678 |
|
677 | 679 | # FIXME: this test is flaky |
@@ -717,8 +719,8 @@ async def test_subscribe_next_msg(self): |
717 | 719 | await sub.next_msg(timeout=0.5) |
718 | 720 |
|
719 | 721 | # Send again a couple of messages. |
720 | | - await nc.publish(f"tests.2", b"bar") |
721 | | - await nc.publish(f"tests.3", b"bar") |
| 722 | + await nc.publish("tests.2", b"bar") |
| 723 | + await nc.publish("tests.3", b"bar") |
722 | 724 | await nc.flush() |
723 | 725 | msg = await sub.next_msg() |
724 | 726 | self.assertEqual("tests.2", msg.subject) |
@@ -2809,7 +2811,7 @@ async def test_drain_cancelled_errors_raised(self): |
2809 | 2811 | async def cb(msg): |
2810 | 2812 | await asyncio.sleep(20) |
2811 | 2813 |
|
2812 | | - sub = await nc.subscribe(f"test.sub", cb=cb) |
| 2814 | + sub = await nc.subscribe("test.sub", cb=cb) |
2813 | 2815 | await nc.publish("test.sub") |
2814 | 2816 | await nc.publish("test.sub") |
2815 | 2817 | await asyncio.sleep(0.1) |
|
0 commit comments