We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Say I have a list
[{"foo" : "bar"}, {"foo: "bar2"}, {"foo" : "bar"},{"random":"1"}]
Is there a way of asserting that the list contains exactly 2 occurrences of {"foo":"bar"}
Can't seem to find anything in the docs.
The text was updated successfully, but these errors were encountered:
I would do this
items = [{"foo" : "bar"}, {"foo": "bar2"}, {"foo" : "bar"},{"random":"1"}] search = {"foo" : "bar"} matches = [x for x in items if x == search] matches | should.have.length(2)
Sorry, something went wrong.
No branches or pull requests
Say I have a list
Is there a way of asserting that the list contains exactly 2 occurrences of {"foo":"bar"}
Can't seem to find anything in the docs.
The text was updated successfully, but these errors were encountered: