test_upload_download of test-server fails
Hi,

While debugging local Rucio instance issues, I ran into what appears to be a bug in the `test-server` command of test_rucio_server, which includes three functions: ping, upload/download, and whoami. In my case, ping and whoami work perfectly, but the upload/download test fails:
`test_upload_download (rucio.tests.test_rucio_server.TestRucioClient)
CLIENT(USER): rucio upload files to dataset/download dataset ... $ > rucio upload --rse MOCK-POSIX --scope mock /tmp/rucio_testfile_142beb3df6414f4eb0fc25e9f0f421cd /tmp/rucio_testfile_633e06e79c8b4efd8ccb87fa281941cf /tmp/rucio_testfile_8bc0a1cef65b4ebaaf24c0fcb0b2b0fd mock:tests.rucio_client_test_server_7c2a3dd60d424d7f99de09d8c4778560
2021-11-19 04:10:57,912	ERROR	'function' object has no attribute 'debug'
2021-11-19 04:10:57,912	ERROR
Rucio exited with an unexpected/unknown error.`

Full output:
[rucio-server-test-output.log](https://github.com/rucio/rucio/files/7565434/rucio-server-test-output.log)

This was tested from a WN at KEKCC, using the Belle II Rucio service at BNL (blrucio.sdcc.bnl.gov).  Let me know whether this is useful or more info is needed. Thanks.
diff --git a/lib/rucio/common/test_rucio_server.py b/lib/rucio/common/test_rucio_server.py
index 6c0bf83cd..57f13d440 100644
--- a/lib/rucio/common/test_rucio_server.py
+++ b/lib/rucio/common/test_rucio_server.py
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright 2014-2021 CERN
+# Copyright 2021 CERN
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -14,11 +14,9 @@
 # limitations under the License.
 #
 # Authors:
-# - Joaquín Bogado <jbogado@linti.unlp.edu.ar>, 2014-2018
-# - Cedric Serfon <cedric.serfon@cern.ch>, 2015
-# - Martin Barisits <martin.barisits@cern.ch>, 2019
-# - Benedikt Ziemons <benedikt.ziemons@cern.ch>, 2020-2021
-# - Mayank Sharma <mayank.sharma@cern.ch>, 2021
+# - Benedikt Ziemons <benedikt.ziemons@cern.ch>, 2021
+# - Rakshita Varadarajan <rakshitajps@gmail.com>, 2021
+# - Joel Dierkes <joel.dierkes@cern.ch>, 2021
 
 from __future__ import print_function
 
@@ -41,7 +39,8 @@ def file_generator(size=2048, namelen=10):
 def get_scope_and_rses():
     """
     Check if xrd containers rses for xrootd are available in the testing environment.
-    :return: A tuple (scope, rses) for the rucio client where scope is mock/test and rses is a list.
+
+    :return: A tuple (scope, rses) for the rucio client where scope is mock/test and rses is a list or (None, [None]) if no suitable rse exists.
     """
     cmd = "rucio list-rses --rses 'test_container_xrd=True'"
     print(cmd)
@@ -49,7 +48,7 @@ def get_scope_and_rses():
     print(out, err)
     rses = out.split()
     if len(rses) == 0:
-        return 'mock', ['MOCK-POSIX']
+        return None, [None]
     return 'test', rses
 
 
@@ -99,6 +98,9 @@ class TestRucioServer(unittest.TestCase):
 
     def test_upload_download(self):
         """CLIENT(USER): rucio upload files to dataset/download dataset"""
+        if self.rse is None:
+            return
+
         tmp_file1 = file_generator()
         tmp_file2 = file_generator()
         tmp_file3 = file_generator()
['lib/rucio/common/test_rucio_server.py']