From eb3a86ee6532be7a80b4b12323a2edfc37ef4325 Mon Sep 17 00:00:00 2001 From: Timothy Oehrlein Date: Sat, 31 Oct 2020 18:07:21 -0500 Subject: [PATCH 1/2] Corrected "analyzier" typo to "analyzer" in tests/test_fields.py --- tests/test_fields.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_fields.py b/tests/test_fields.py index 8e3f5d85..8aacd9f9 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -88,7 +88,7 @@ def test_get_mapping(self): def test_get_value_from_instance(self): field = ObjectField(attr='person', properties={ - 'first_name': TextField(analyzier='foo'), + 'first_name': TextField(analyzer='foo'), 'last_name': TextField() }) @@ -102,7 +102,7 @@ def test_get_value_from_instance(self): def test_get_value_from_instance_with_inner_objectfield(self): field = ObjectField(attr='person', properties={ - 'first_name': TextField(analyzier='foo'), + 'first_name': TextField(analyzer='foo'), 'last_name': TextField(), 'aditional': ObjectField(properties={ 'age': IntegerField() @@ -122,7 +122,7 @@ def test_get_value_from_instance_with_inner_objectfield(self): def test_get_value_from_instance_with_none_inner_objectfield(self): field = ObjectField(attr='person', properties={ - 'first_name': TextField(analyzier='foo'), + 'first_name': TextField(analyzer='foo'), 'last_name': TextField(), 'aditional': ObjectField(properties={ 'age': IntegerField() @@ -142,7 +142,7 @@ def test_get_value_from_instance_with_none_inner_objectfield(self): def test_get_value_from_iterable(self): field = ObjectField(attr='person', properties={ - 'first_name': TextField(analyzier='foo'), + 'first_name': TextField(analyzer='foo'), 'last_name': TextField() }) From 15f15bd30836732d6c31e2cef6094eb5f654b390 Mon Sep 17 00:00:00 2001 From: Timothy Oehrlein Date: Sat, 31 Oct 2020 19:11:44 -0500 Subject: [PATCH 2/2] Fixed typo of "aditional" to "additional" --- tests/test_fields.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/test_fields.py b/tests/test_fields.py index 8aacd9f9..af216ae2 100644 --- a/tests/test_fields.py +++ b/tests/test_fields.py @@ -104,40 +104,40 @@ def test_get_value_from_instance_with_inner_objectfield(self): field = ObjectField(attr='person', properties={ 'first_name': TextField(analyzer='foo'), 'last_name': TextField(), - 'aditional': ObjectField(properties={ + 'additional': ObjectField(properties={ 'age': IntegerField() }) }) instance = NonCallableMock(person=NonCallableMock( first_name="foo", last_name="bar", - aditional=NonCallableMock(age=12) + additional=NonCallableMock(age=12) )) self.assertEqual(field.get_value_from_instance(instance), { 'first_name': "foo", 'last_name': "bar", - 'aditional': {'age': 12} + 'additional': {'age': 12} }) def test_get_value_from_instance_with_none_inner_objectfield(self): field = ObjectField(attr='person', properties={ 'first_name': TextField(analyzer='foo'), 'last_name': TextField(), - 'aditional': ObjectField(properties={ + 'additional': ObjectField(properties={ 'age': IntegerField() }) }) instance = NonCallableMock(person=NonCallableMock( first_name="foo", last_name="bar", - aditional=None + additional=None )) self.assertEqual(field.get_value_from_instance(instance), { 'first_name': "foo", 'last_name': "bar", - 'aditional': {} + 'additional': {} }) def test_get_value_from_iterable(self):