@@ -88,7 +88,7 @@ def test_get_mapping(self):
88
88
89
89
def test_get_value_from_instance (self ):
90
90
field = ObjectField (attr = 'person' , properties = {
91
- 'first_name' : TextField (analyzier = 'foo' ),
91
+ 'first_name' : TextField (analyzer = 'foo' ),
92
92
'last_name' : TextField ()
93
93
})
94
94
@@ -102,47 +102,47 @@ def test_get_value_from_instance(self):
102
102
103
103
def test_get_value_from_instance_with_inner_objectfield (self ):
104
104
field = ObjectField (attr = 'person' , properties = {
105
- 'first_name' : TextField (analyzier = 'foo' ),
105
+ 'first_name' : TextField (analyzer = 'foo' ),
106
106
'last_name' : TextField (),
107
- 'aditional ' : ObjectField (properties = {
107
+ 'additional ' : ObjectField (properties = {
108
108
'age' : IntegerField ()
109
109
})
110
110
})
111
111
112
112
instance = NonCallableMock (person = NonCallableMock (
113
113
first_name = "foo" , last_name = "bar" ,
114
- aditional = NonCallableMock (age = 12 )
114
+ additional = NonCallableMock (age = 12 )
115
115
))
116
116
117
117
self .assertEqual (field .get_value_from_instance (instance ), {
118
118
'first_name' : "foo" ,
119
119
'last_name' : "bar" ,
120
- 'aditional ' : {'age' : 12 }
120
+ 'additional ' : {'age' : 12 }
121
121
})
122
122
123
123
def test_get_value_from_instance_with_none_inner_objectfield (self ):
124
124
field = ObjectField (attr = 'person' , properties = {
125
- 'first_name' : TextField (analyzier = 'foo' ),
125
+ 'first_name' : TextField (analyzer = 'foo' ),
126
126
'last_name' : TextField (),
127
- 'aditional ' : ObjectField (properties = {
127
+ 'additional ' : ObjectField (properties = {
128
128
'age' : IntegerField ()
129
129
})
130
130
})
131
131
132
132
instance = NonCallableMock (person = NonCallableMock (
133
133
first_name = "foo" , last_name = "bar" ,
134
- aditional = None
134
+ additional = None
135
135
))
136
136
137
137
self .assertEqual (field .get_value_from_instance (instance ), {
138
138
'first_name' : "foo" ,
139
139
'last_name' : "bar" ,
140
- 'aditional ' : {}
140
+ 'additional ' : {}
141
141
})
142
142
143
143
def test_get_value_from_iterable (self ):
144
144
field = ObjectField (attr = 'person' , properties = {
145
- 'first_name' : TextField (analyzier = 'foo' ),
145
+ 'first_name' : TextField (analyzer = 'foo' ),
146
146
'last_name' : TextField ()
147
147
})
148
148
0 commit comments