Files
deb-python-sqlalchemy-utils/tests/primitives/test_country.py
2015-04-08 19:10:53 +03:00

19 lines
515 B
Python

from sqlalchemy_utils import Country
class TestCountry(object):
def test_init(self):
assert Country(u'fi') == Country(Country(u'fi'))
def test_equality_operator(self):
assert Country(u'fi') == u'fi'
assert u'fi' == Country(u'fi')
assert Country(u'fi') == Country(u'fi')
def test_non_equality_operator(self):
assert Country(u'fi') != u'sv'
assert not (Country(u'fi') != u'fi')
def test_hash(self):
return hash(Country('fi')) == hash('fi')