Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix test
  • Loading branch information
domi4484 committed Jul 26, 2021
1 parent 1007ee0 commit fad0375
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_provider_memory.py
Expand Up @@ -784,7 +784,7 @@ def testSpatialIndex(self):
vl.dataProvider().createSpatialIndex()
self.assertEqual(vl.hasSpatialIndex(), QgsFeatureSource.SpatialIndexPresent)

def testClone(self):
def testCloneId(self):
"""Test that a cloned layer has a single new id and
the same fields as the source layer"""

Expand All @@ -798,7 +798,7 @@ def testClone(self):
QgsField("size", QVariant.Double)]))
vl2 = vl.clone()
self.assertTrue(
'memory?geometry=Point&crs=EPSG:4326&field=name:(0,0)&field=age:(0,0)&field=size:(0,0)' in vl2.publicSource())
'memory?geometry=Point&crs=EPSG:4326&field=name:string(0,0)&field=age:integer(0,0)&field=size:double(0,0)' in vl2.publicSource())
self.assertEqual(len(parse_qs(vl.publicSource())['uid']), 1)
self.assertEqual(len(parse_qs(vl2.publicSource())['uid']), 1)
self.assertNotEqual(parse_qs(vl2.publicSource())['uid'][0], parse_qs(vl.publicSource())['uid'][0])
Expand Down

0 comments on commit fad0375

Please sign in to comment.