Skip to content
Permalink
Browse files

Update tests after group removal from user exp

  • Loading branch information
elpaso committed Dec 18, 2019
1 parent a8c0e4c commit 89bddec34b3ba4de27e8009399609bed6cc66821
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/src/python/test_qgsexpressionbuilderwidget.py
@@ -169,14 +169,14 @@ def testStoredExpressions(self):

w = QgsExpressionBuilderWidget()

w.saveToUserExpressions('Stored Expression Number One', '"field_one" = 123', "An humble expression", "my_custom_collection")
w.saveToUserExpressions('Stored Expression Number One', '"field_one" = 123', "An humble expression")
items = w.findExpressions('Stored Expression Number One')
self.assertEqual(len(items), 1)
exp = items[0]
self.assertEqual(exp.getExpressionText(), '"field_one" = 123')

# Add another one with the same name (overwrite)
w.saveToUserExpressions('Stored Expression Number One', '"field_two" = 456', "An even more humble expression", "my_custom_collection")
w.saveToUserExpressions('Stored Expression Number One', '"field_two" = 456', "An even more humble expression")
items = w.findExpressions('Stored Expression Number One')
self.assertEqual(len(items), 1)
exp = items[0]
@@ -187,7 +187,7 @@ def testStoredExpressions(self):
self.assertEqual(exp.getExpressionText(), '"field_two" = 456')

# Test removal
w.removeFromUserExpressions('Stored Expression Number One', "my_custom_collection")
w.removeFromUserExpressions('Stored Expression Number One')
items = w.findExpressions('Stored Expression Number One')
self.assertEqual(len(items), 0)

0 comments on commit 89bddec

Please sign in to comment.
You can’t perform that action at this time.