Skip to content

Commit

Permalink
Merge pull request #115 from rbw/bugfix/qb-notlike-operator
Browse files Browse the repository at this point in the history
Use NOT LIKE in QueryBuilder.not_contains
  • Loading branch information
rbw authored Jun 12, 2019
2 parents 1042695 + f0ad089 commit bc9d12f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pysnow/query_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def not_contains(self, not_contains):
:param not_contains: Match field not containing the provided value
"""

return self._add_condition('NOTLIKE', not_contains, types=[str])
return self._add_condition('NOT LIKE', not_contains, types=[str])

def is_empty(self):
"""Adds new `ISEMPTY` condition"""
Expand Down
2 changes: 1 addition & 1 deletion tests/test_query_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def test_query_cond_not_contains(self):

# Make sure a valid operation works
q2 = pysnow.QueryBuilder().field('test').not_contains('val')
self.assertEqual(str(q2), 'testNOTLIKEval')
self.assertEqual(str(q2), 'testNOT LIKEval')

def test_query_cond_is_empty(self):
# Make sure a valid operation works
Expand Down

0 comments on commit bc9d12f

Please sign in to comment.