Skip to content

Commit

Permalink
Refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqiu committed Apr 20, 2016
1 parent 688d33f commit bc6cd87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/mountebank/stub/predicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def __init__(self):

@classmethod
def _handle_normal_predicate(cls, merged_predicate, predicate):
return {predicate.field_name: predicate.value}
value = predicate.value
return {predicate.field_name: value}

@classmethod
def _handle_high_order_predicate(cls, merged_predicate, predicate):
Expand Down
5 changes: 0 additions & 5 deletions tests/unit/stub/test_predicates.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,3 @@ def test_build_predicate_matches():
def test_build_predicate_exists():
expected = _Predicate('exists', 'path', True)
assert expected == http_request.path.exists(True)


# def test_build_predicate_exists_must_be_called_with_boolean():
# with pytest.raises(AssertionError):
# http_request.path.exists('True')

0 comments on commit bc6cd87

Please sign in to comment.