def test_get_reuses_instances(self): with MonkeyPatchScope([(docker, '_DOCKER', TruePath())]): conn1 = containersconnection.get() conn2 = containersconnection.get() self.assertIsNotNone(conn1) self.assertIsNotNone(conn2) self.assertIs(conn1, conn2)
def test_get_succeeds(self): with MonkeyPatchScope([(docker, '_DOCKER', TruePath())]): conn = containersconnection.get() self.assertIsNotNone(conn)