mirror of
https://github.com/psycopg/psycopg2.git
synced 2024-11-11 03:26:37 +03:00
Fixed inet test that wasn't testing anything
This commit is contained in:
parent
98d6d96ee3
commit
9ffa1f4b59
|
@ -82,9 +82,9 @@ class TypesExtrasTests(unittest.TestCase):
|
|||
|
||||
def testINET(self):
|
||||
psycopg2.extras.register_inet()
|
||||
i = "192.168.1.0/24";
|
||||
i = psycopg2.extras.Inet("192.168.1.0/24")
|
||||
s = self.execute("SELECT %s AS foo", (i,))
|
||||
self.failUnless(i == s)
|
||||
self.failUnless(i.addr == s.addr)
|
||||
# must survive NULL cast to inet
|
||||
s = self.execute("SELECT NULL::inet AS foo")
|
||||
self.failUnless(s is None)
|
||||
|
|
Loading…
Reference in New Issue
Block a user