chore: fix tests
This commit is contained in:
parent
c5fd72fe2b
commit
1415f96c6f
3 changed files with 7 additions and 5 deletions
|
@ -25,10 +25,11 @@ class Migration(migrations.Migration):
|
|||
field=models.UUIDField(default=uuid.uuid4, editable=False, null=True),
|
||||
),
|
||||
migrations.RunPython(gen_uuid, reverse_code=migrations.RunPython.noop),
|
||||
migrations.AlterField("datalayer", name="id", field=models.CharField(max_length=100)),
|
||||
migrations.AlterField("datalayer", name="id", field=models.CharField(max_length=100, null=True)),
|
||||
migrations.AlterField(
|
||||
model_name="datalayer",
|
||||
name="uuid",
|
||||
field=models.UUIDField(default=uuid.uuid4, editable=False, unique=True, primary_key=True),
|
||||
),
|
||||
# migrations.RemoveConstraint("datalayer", "")
|
||||
]
|
||||
|
|
|
@ -3,6 +3,7 @@ from copy import copy
|
|||
|
||||
from django import template
|
||||
from django.conf import settings
|
||||
from django.core.serializers.json import DjangoJSONEncoder
|
||||
|
||||
register = template.Library()
|
||||
|
||||
|
@ -25,7 +26,7 @@ def map_fragment(map_instance, **kwargs):
|
|||
page = kwargs.pop("page", None) or ""
|
||||
unique_id = prefix + str(page) + "_" + str(map_instance.pk)
|
||||
return {
|
||||
"map_settings": json.dumps(map_settings),
|
||||
"map_settings": json.dumps(map_settings, cls=DjangoJSONEncoder),
|
||||
"map": map_instance,
|
||||
"unique_id": unique_id,
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ def test_collaborative_editing_create_markers(context, live_server, tilelayer):
|
|||
"name": "test datalayer",
|
||||
"inCaption": True,
|
||||
"editMode": "advanced",
|
||||
"id": datalayer.pk,
|
||||
"id": str(datalayer.pk),
|
||||
"permissions": {"edit_status": 1},
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ def test_collaborative_editing_create_markers(context, live_server, tilelayer):
|
|||
"name": "test datalayer",
|
||||
"inCaption": True,
|
||||
"editMode": "advanced",
|
||||
"id": datalayer.pk,
|
||||
"id": str(datalayer.pk),
|
||||
"permissions": {"edit_status": 1},
|
||||
}
|
||||
expect(marker_pane_p1).to_have_count(4)
|
||||
|
@ -136,7 +136,7 @@ def test_collaborative_editing_create_markers(context, live_server, tilelayer):
|
|||
"name": "test datalayer",
|
||||
"inCaption": True,
|
||||
"editMode": "advanced",
|
||||
"id": datalayer.pk,
|
||||
"id": str(datalayer.pk),
|
||||
"permissions": {"edit_status": 1},
|
||||
}
|
||||
expect(marker_pane_p2).to_have_count(5)
|
||||
|
|
Loading…
Reference in a new issue