예제 #1
0
    def testEqSameArgs(self):
        # Test using '==' operator on two EqConnectionPool instances with
        # same arguments
        pool1 = mtrlogobserver.EqConnectionPool("MySQLdb",
                                                "host",
                                                "buildbot",
                                                "password",
                                                "db",
                                                extra="dummy")

        pool2 = mtrlogobserver.EqConnectionPool("MySQLdb",
                                                "host",
                                                "buildbot",
                                                "password",
                                                "db",
                                                extra="dummy")
        self.assertTrue(pool1 == pool2)
예제 #2
0
 def testEqSameInstance(self):
     # Test using '==' operator on same EqConnectionPool instance
     pool = mtrlogobserver.EqConnectionPool("MySQLdb",
                                            "host",
                                            "buildbot",
                                            "password",
                                            "db")
     self.assertTrue(pool == pool)
예제 #3
0
 def testNeDiffType(self):
     # Test using '!=' operator on an EqConnectionPool instance and object
     # of different type
     pool = mtrlogobserver.EqConnectionPool("DummyDb1")
     self.assertTrue(pool != object())
예제 #4
0
 def testNeDiffArgs(self):
     # Test using '!=' operator on two EqConnectionPool instances with
     # different arguments
     pool1 = mtrlogobserver.EqConnectionPool("DummyDb1")
     pool2 = mtrlogobserver.EqConnectionPool("DummyDb2")
     self.assertTrue(pool1 != pool2)
예제 #5
0
 def testNeSameArgs(self):
     # Test using '!=' operator on two EqConnectionPool instances with same
     # arguments
     pool1 = mtrlogobserver.EqConnectionPool("DummyDb1", "x", y="z")
     pool2 = mtrlogobserver.EqConnectionPool("DummyDb1", "x", y="z")
     self.assertFalse(pool1 != pool2)
예제 #6
0
 def testNeSameInstance(self):
     # Test using '!=' operator on same EqConnectionPool instance
     pool = mtrlogobserver.EqConnectionPool("DummyDb1")
     self.assertFalse(pool != pool)