Skip to content

Commit

Permalink
test: fix unit tests by moving import statement
Browse files Browse the repository at this point in the history
  • Loading branch information
gabor-boros committed Aug 19, 2021
1 parent 0c12e02 commit d95ce1d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions t/unit/transport/test_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from kombu import Connection, Consumer, Exchange, Producer, Queue
from kombu.exceptions import InconsistencyError, VersionMismatch
from kombu.transport import virtual
from kombu.transport.redis import GlobalKeyPrefixMixin
from kombu.utils import eventio # patch poll
from kombu.utils.json import dumps

Expand Down Expand Up @@ -1548,12 +1547,14 @@ def test_sentinel_with_ssl(self):

class test_GlobalKeyPrefixMixin:

from kombu.transport.redis import GlobalKeyPrefixMixin

global_keyprefix = "prefix_"
mixin = GlobalKeyPrefixMixin()
mixin.global_keyprefix = global_keyprefix

def test_prefix_simple_args(self):
for command in GlobalKeyPrefixMixin.PREFIXED_SIMPLE_COMMANDS:
for command in self.mixin.PREFIXED_SIMPLE_COMMANDS:
prefixed_args = self.mixin._prefix_args([command, "fake_key"])
assert prefixed_args == [
command,
Expand Down

0 comments on commit d95ce1d

Please sign in to comment.