Changeset 543


Ignore:
Timestamp:
Nov 18, 2015, 1:15:47 PM (4 years ago)
Author:
cito
Message:

Check against the configured host and port in tests

Location:
branches/4.x/module
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.x/module/TEST_PyGreSQL_classic_connection.py

    r542 r543  
    9999    def testAttributeHost(self):
    100100        def_host = 'localhost'
    101         self.assertEqual(self.connection.host, def_host)
     101        self.assertIsInstance(self.connection.host, str)
     102        self.assertEqual(self.connection.host, dbhost or def_host)
    102103
    103104    def testAttributeOptions(self):
     
    106107
    107108    def testAttributePort(self):
    108         def_port = 5432
    109109        self.assertIsInstance(self.connection.port, int)
    110         self.assertEqual(self.connection.port, def_port)
     110        self.assertEqual(self.connection.port, dbport or dbport)
    111111
    112112    def testAttributeProtocolVersion(self):
  • branches/4.x/module/TEST_PyGreSQL_classic_dbwrapper.py

    r542 r543  
    136136        def_host = 'localhost'
    137137        host = self.db.host
    138         self.assertEqual(host, def_host)
     138        self.assertIsInstance(host, str)
     139        self.assertEqual(host, dbhost or def_host)
    139140        self.assertEqual(host, self.db.db.host)
    140141
     
    149150        port = self.db.port
    150151        self.assertIsInstance(port, int)
    151         self.assertEqual(port, def_port)
     152        self.assertEqual(port, dbport or def_port)
    152153        self.assertEqual(port, self.db.db.port)
    153154
Note: See TracChangeset for help on using the changeset viewer.