Skip to content

should_not assertion message incorrect #18

@lerovitch

Description

@lerovitch
>>> import mock
>>> spam = mock.MagicMock()
>>> spam.eggs({'foo': 'foo', 'bar': 'bar'})
>>> from pyshould import should_not
>>> spam.eggs.assert_called_with(should.be_dict.should_not.have_key('foo'))
AssertionError: Expected call: eggs(a dictionary containing key 'foo')
Actual call: eggs({'foo': 'foo', 'bar': 'bar'})

The message should say something like

AssertionError: Expected call: eggs(a dictionary not containing key 'foo')
Actual call: eggs({'foo': 'foo', 'bar': 'bar'})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions