Skip to content

Commit 867aa96

Browse files
committed
Add test of == method with something other than a model
1 parent 4bc63cc commit 867aa96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/models_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ def test_city_full(self):
248248
self.assertRegex(
249249
str(model), r'^geoip2.models.City\(\{.*geoname_id.*\}, \[.*en.*\]\)')
250250

251+
self.assertFalse(
252+
model == True, '__eq__ does not blow up on weird input')
253+
251254
def test_unknown_keys(self):
252255
model = geoip2.models.City({'traits': {'ip_address': '1.2.3.4',
253256
'invalid': 'blah'},

0 commit comments

Comments
 (0)