You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_____________________________ test_resume_publish ______________________________
creds = <Mock spec='Credentials' id='1406[34](https://github.com/googleapis/python-pubsub/actions/runs/3876452107/jobs/6610366435#step:5:35)993473040'>
def test_resume_publish(creds):
publisher_options = types.PublisherOptions(enable_message_ordering=True)
client = publisher.Client(publisher_options=publisher_options, credentials=creds)
topic = "topic"
ordering_key = "ord_key"
sequencer = mock.Mock(spec=ordered_sequencer.OrderedSequencer)
client._set_sequencer(topic=topic, sequencer=sequencer, ordering_key=ordering_key)
client.resume_publish(topic, ordering_key)
> assert sequencer.unpause.called_once()
tests/unit/pubsub_v1/publisher/test_publisher_client.py:639:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Mock name='mock.unpause' id='1406[35](https://github.com/googleapis/python-pubsub/actions/runs/3876452107/jobs/6610366435#step:5:36)0020[41](https://github.com/googleapis/python-pubsub/actions/runs/3876452107/jobs/6610366435#step:5:42)[48](https://github.com/googleapis/python-pubsub/actions/runs/3876452107/jobs/6610366435#step:5:49)8'>, name = 'called_once'
def __getattr__(self, name):
if name in {'_mock_methods', '_mock_unsafe'}:
raise AttributeError(name)
elif self._mock_methods is not None:
if name not in self._mock_methods or name in _all_magics:
raise AttributeError("Mock object has no attribute %r" % name)
elif _is_magic(name):
raise AttributeError(name)
if not self._mock_unsafe and (not self._mock_methods or name not in self._mock_methods):
if name.startswith(('assert', 'assret', 'asert', 'aseert', 'assrt')) or name in _ATTRIB_DENY_LIST:
raise AttributeError(
> f"{name!r} is not a valid assertion. Use a spec "
f"for the mock if {name!r} is meant to be an attribute.")
E AttributeError: 'called_once' is not a valid assertion. Use a spec for the mock if 'called_once' is meant to be an attribute.
.nox/unit-3-7/lib/python3.7/site-packages/mock/mock.py:6[61](https://github.com/googleapis/python-pubsub/actions/runs/3876452107/jobs/6610366435#step:5:62): AttributeError
See build failure here.
Stack trace