Skip to content

Commit

Permalink
refactor(test): add chained test for keys
Browse files Browse the repository at this point in the history
  • Loading branch information
h2non committed Mar 6, 2017
1 parent 48aff3b commit a971f57
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/operators/keys_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ def test_expect_keys(should):
{'foo': 'bar'} | should.have.key('foo') > should.be.equal.to('bar')
'bar' | should.be.equal.to('bar')

({'foo': {'bar': True}}
| should.have.key('foo')
> should.be.a('dict')
> should.have.key('bar')
> should.be.equal.to({'bar': True}))

should({'foo': 'bar'}).have.key('foo') > should.be.equal.to('bar')
should({'foo': 'bar'}).have.key('foo').which.should.be.equal.to('bar')

Expand Down

0 comments on commit a971f57

Please sign in to comment.