I have following test in a file, which worked fine
def test_valid_message_checkr(self):
"""Test lock works and locked message is not submitted"""
allow(module).is_enabled_city.and_return(False)
consumer = InstanceDouble('bgc.lib.kafka.Consumer')
with no_builtin_verification():
allow(module.Consumer).__new__.and_return(consumer)
allow(consumer).get_envelopes.and_return(
[ujson.dumps(self.kafka_bgc_log)],
)
allow(consumer).lock_message.and_return(False)
expect(application).submit.never()
module.main()
Somehow this results in totally unrelated failure in other file
File "/home/uber/background-check/env/local/lib/python2.7/site-packages/mock.py", line 1201, in patched
return func(*args, **keywargs)
File "/home/uber/background-check/bgc/tests/lib/kafka/kafka_consumer_test.py", line 26, in test_get_envelopes
consumer = Consumer('background-check.submit', 42)
DeprecationWarning: object.new() takes no parameters
I have following test in a file, which worked fine
Somehow this results in totally unrelated failure in other file
_ TestConsumer.test_getenvelopes Traceback (most recent call last):