blob: e520f3f631ee641eed53b06e6016eae9c82840fd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
class TestPackage:
def test_top_level_namespace(self):
import kafka as kafka1
assert kafka1.KafkaConsumer.__name__ == "KafkaConsumer"
assert kafka1.consumer.__name__ == "kafka.consumer"
assert kafka1.codec.__name__ == "kafka.codec"
def test_submodule_namespace(self):
import kafka.client as client1
assert client1.__name__ == "kafka.client"
from kafka import client as client2
assert client2.__name__ == "kafka.client"
from kafka.client import SimpleClient as SimpleClient1
assert SimpleClient1.__name__ == "SimpleClient"
from kafka.codec import gzip_encode as gzip_encode1
assert gzip_encode1.__name__ == "gzip_encode"
from kafka import SimpleClient as SimpleClient2
assert SimpleClient2.__name__ == "SimpleClient"
from kafka.codec import snappy_encode
assert snappy_encode.__name__ == "snappy_encode"
|