diff options
author | Akihiro Motoki <amotoki@gmail.com> | 2021-02-24 21:36:07 +0900 |
---|---|---|
committer | Vishal Manchanda <manchandavishal143@gmail.com> | 2021-09-14 19:36:27 +0000 |
commit | 44b7c03fbab93cab768f03e0ea8a517a34bf6053 (patch) | |
tree | 22a454b3b1c548674b1672b58d7ed88fe085c7d4 /openstack_dashboard/dashboards | |
parent | a0dd4d738cf6587e59f315b2ec60bde63c9b05ca (diff) | |
download | horizon-44b7c03fbab93cab768f03e0ea8a517a34bf6053.tar.gz |
Support Django 3.0 and 3.1 support (4)
assertFormErrors() now compares actual and expected messages
after parsing them as HTML. Similar to the previous commit,
after Django 3.0 escaped characters are handled differently
(decimal representation, hexdecimal representation and
unescaped representation) so we need an uniform way to compare
texts. Instead of comparing texts literally, this commit changes
assertFormErrors to compare texts after parsing them as HTML.
Change-Id: I4ff89cdcb27a2671c7d79fb2caec30585696a30f
Diffstat (limited to 'openstack_dashboard/dashboards')
-rw-r--r-- | openstack_dashboard/dashboards/admin/aggregates/tests.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openstack_dashboard/dashboards/admin/aggregates/tests.py b/openstack_dashboard/dashboards/admin/aggregates/tests.py index 2b6d66da2..2eb825d7e 100644 --- a/openstack_dashboard/dashboards/admin/aggregates/tests.py +++ b/openstack_dashboard/dashboards/admin/aggregates/tests.py @@ -104,7 +104,7 @@ class CreateAggregateWorkflowTests(BaseAggregateWorkflowTests): workflow_data['name'] = '' workflow_data['availability_zone'] = '' self._test_generic_create_aggregate(workflow_data, aggregate, (), 1, - 'This field is required') + 'This field is required.') def test_create_aggregate_fails_missing_fields_existing_aggregates(self): aggregate = self.aggregates.first() @@ -115,7 +115,7 @@ class CreateAggregateWorkflowTests(BaseAggregateWorkflowTests): self._test_generic_create_aggregate(workflow_data, aggregate, existing_aggregates, 1, - 'This field is required') + 'This field is required.') def test_create_aggregate_fails_duplicated_name(self): aggregate = self.aggregates.first() @@ -254,7 +254,7 @@ class AggregatesViewTests(test.BaseAdminViewTests): 'availability_zone': aggregate.availability_zone} self._test_generic_update_aggregate(form_data, aggregate, 1, - 'This field is required') + 'This field is required.') def test_update_aggregate_fails_missing_az_field(self): aggregate = self.aggregates.first() |