File tree Expand file tree Collapse file tree 2 files changed +54
-17
lines changed
Expand file tree Collapse file tree 2 files changed +54
-17
lines changed Original file line number Diff line number Diff line change @@ -356,18 +356,17 @@ class Location(Record):
356356 :type: unicode
357357
358358 """
359- def __init__ (
360- self ,
361- average_income = None ,
362- accuracy_radius = None ,
363- latitude = None ,
364- longitude = None ,
365- metro_code = None ,
366- population_density = None ,
367- postal_code = None ,
368- postal_confidence = None ,
369- time_zone = None ,
370- ):
359+ def __init__ (self ,
360+ average_income = None ,
361+ accuracy_radius = None ,
362+ latitude = None ,
363+ longitude = None ,
364+ metro_code = None ,
365+ population_density = None ,
366+ postal_code = None ,
367+ postal_confidence = None ,
368+ time_zone = None ,
369+ ** _ ):
371370 self .average_income = average_income
372371 self .accuracy_radius = accuracy_radius
373372 self .latitude = latitude
@@ -392,10 +391,7 @@ class MaxMind(Record):
392391 :type: int
393392
394393 """
395- def __init__ (
396- self ,
397- queries_remaining = None ,
398- ):
394+ def __init__ (self , queries_remaining = None , ** _ ):
399395 self .queries_remaining = queries_remaining
400396
401397
@@ -426,7 +422,7 @@ class Postal(Record):
426422 :type: int
427423
428424 """
429- def __init__ (self , code = None , confidence = None ):
425+ def __init__ (self , code = None , confidence = None , ** _ ):
430426 self .code = code
431427 self .confidence = confidence
432428
Original file line number Diff line number Diff line change @@ -294,6 +294,47 @@ def test_city_full(self):
294294
295295 def test_unknown_keys (self ):
296296 model = geoip2 .models .City ({
297+ 'city' : {
298+ 'invalid' : 0
299+ },
300+ 'continent' : {
301+ 'invalid' : 0 ,
302+ 'names' : {
303+ 'invalid' : 0
304+ },
305+ },
306+ 'country' : {
307+ 'invalid' : 0 ,
308+ 'names' : {
309+ 'invalid' : 0
310+ },
311+ },
312+ 'location' : {
313+ 'invalid' : 0
314+ },
315+ 'postal' : {
316+ 'invalid' : 0
317+ },
318+ 'subdivisions' : [
319+ {
320+ 'invalid' : 0 ,
321+ 'names' : {
322+ 'invalid' : 0 ,
323+ },
324+ },
325+ ],
326+ 'registered_country' : {
327+ 'invalid' : 0 ,
328+ 'names' : {
329+ 'invalid' : 0 ,
330+ },
331+ },
332+ 'represented_country' : {
333+ 'invalid' : 0 ,
334+ 'names' : {
335+ 'invalid' : 0 ,
336+ },
337+ },
297338 'traits' : {
298339 'ip_address' : '1.2.3.4' ,
299340 'invalid' : 'blah'
You can’t perform that action at this time.
0 commit comments