diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_add.py b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_add.py
index 2330788..5b181d1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_add.py
@@ -37,7 +37,7 @@ class EventTriggerAddTestCase(BaseTestGenerator):
         self.schema_id = self.schema_data['schema_id']
         self.extension_name = "postgres_fdw"
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
+        self.func_name = "trigger_func_%s" % str(uuid.uuid4()).replace("-", "")
         self.db_user = self.server["username"]
         server_con = server_utils.connect_server(self, self.server_id)
         if not server_con["info"] == "Server connected.":
@@ -76,7 +76,7 @@ class EventTriggerAddTestCase(BaseTestGenerator):
             "eventfunname": "%s.%s" % (self.schema_name, self.func_name),
             "eventname": "DDL_COMMAND_END",
             "eventowner": self.db_user,
-            "name": "event_trigger_add_%s" % (str(uuid.uuid4())[1:6]),
+            "name": "event_trigger_add_%s" % (str(uuid.uuid4()).replace("-", "")),
             "providers": []
         }
         response = self.tester.post(
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_delete.py b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_delete.py
index e8dd4ae..2ab679e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_delete.py
@@ -38,9 +38,9 @@ class EventTriggerDeleteTestCase(BaseTestGenerator):
         self.extension_name = "postgres_fdw"
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.db_user = self.server["username"]
-        self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
+        self.func_name = "trigger_func_%s" % str(uuid.uuid4()).replace("-", "")
         self.trigger_name = "event_trigger_delete_%s" % (
-            str(uuid.uuid4())[1:6])
+            str(uuid.uuid4()).replace("-", ""))
         server_con = server_utils.connect_server(self, self.server_id)
         if not server_con["info"] == "Server connected.":
             raise Exception("Could not connect to server to add resource "
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_get.py b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_get.py
index 540dacf..8441bf7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_get.py
@@ -38,8 +38,8 @@ class EventTriggerGetTestCase(BaseTestGenerator):
         self.extension_name = "postgres_fdw"
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.db_user = self.server["username"]
-        self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
-        self.trigger_name = "event_trigger_get_%s" % (str(uuid.uuid4())[1:6])
+        self.func_name = "trigger_func_%s" % str(uuid.uuid4()).replace("-", "")
+        self.trigger_name = "event_trigger_get_%s" % (str(uuid.uuid4()).replace("-", ""))
         server_con = server_utils.connect_server(self, self.server_id)
         if not server_con["info"] == "Server connected.":
             raise Exception("Could not connect to server to add resource "
diff --git a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_put.py b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_put.py
index d232cdb..f6d5b78 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/event_triggers/tests/test_event_trigger_put.py
@@ -39,8 +39,8 @@ class EventTriggerPutTestCase(BaseTestGenerator):
         self.extension_name = "postgres_fdw"
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.db_user = self.server["username"]
-        self.func_name = "trigger_func_%s" % str(uuid.uuid4())[1:6]
-        self.trigger_name = "event_trigger_put_%s" % (str(uuid.uuid4())[1:6])
+        self.func_name = "trigger_func_%s" % str(uuid.uuid4()).replace("-", "")
+        self.trigger_name = "event_trigger_put_%s" % (str(uuid.uuid4()).replace("-", ""))
         server_con = server_utils.connect_server(self, self.server_id)
         if not server_con["info"] == "Server connected.":
             raise Exception("Could not connect to server to add resource "
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_add.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_add.py
index e5972a1..b0b7f10 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_add.py
@@ -40,7 +40,7 @@ class ForeignServerAddTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_{0}".format(str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
@@ -90,7 +90,7 @@ class ForeignServerAddTestCase(BaseTestGenerator):
                 }
             ],
             "fsrvowner": db_user,
-            "name": "test_fsrv_add_%s" % (str(uuid.uuid4())[1:6])
+            "name": "test_fsrv_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         }
         response = self.tester.post(
             self.url + str(utils.SERVER_GROUP) + '/' +
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_delete.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_delete.py
index 4dd6e2f..9a3b845 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_delete.py
@@ -38,8 +38,8 @@ class ForeignServerDeleteTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "test_fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "test_fsrv_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "test_fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "test_fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_get.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_get.py
index e2ceb7e..66c9ec7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_get.py
@@ -38,8 +38,8 @@ class ForeignServerGetTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "test_fsrv_add_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "test_fsrv_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_put.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_put.py
index fa68200..5ef1862 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/tests/test_foreign_servers_put.py
@@ -39,8 +39,8 @@ class ForeignServerPutTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "test_fsrv_put_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "test_fsrv_put_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
@@ -82,4 +82,4 @@ class ForeignServerPutTestCase(BaseTestGenerator):
          and dependant objects."""
         extension_utils.drop_extension(self.server, self.db_name,
                                        self.extension_name)
-        database_utils.disconnect_database(self, self.server_id, self.db_id)
\ No newline at end of file
+        database_utils.disconnect_database(self, self.server_id, self.db_id)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_add.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_add.py
index 96955c6..73bda52 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_add.py
@@ -41,8 +41,8 @@ class UserMappingAddTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_delete.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_delete.py
index b4896e4..08e16b3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_delete.py
@@ -40,8 +40,8 @@ class UserMappingDeleteTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_get.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_get.py
index 50ebba8..e172ee0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_get.py
@@ -40,8 +40,8 @@ class UserMappingGetTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_put.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_put.py
index cf077b4..2beef13 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/foreign_servers/user_mapping/tests/test_user_mapping_put.py
@@ -41,8 +41,8 @@ class UserMappingPutTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.extension_name = "cube"
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:6])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.extension_id = extension_utils.create_extension(
             self.server, self.db_name, self.extension_name, self.schema_name)
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_delete.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_delete.py
index cb758c6..a0475fc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_delete.py
@@ -34,7 +34,7 @@ class FDWDDeleteTestCase(BaseTestGenerator):
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
-        self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_{0}".format(str(uuid.uuid4()).replace("-", ""))
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_get.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_get.py
index 5a1bd93..dbe5003 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_get.py
@@ -34,7 +34,7 @@ class FDWDGetTestCase(BaseTestGenerator):
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
-        self.fdw_name = "fdw_{0}".format(str(uuid.uuid4())[1:4])
+        self.fdw_name = "fdw_{0}".format(str(uuid.uuid4()).replace("-", ""))
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_put.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_put.py
index bc12d39..e63a2d2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/test_fdw_put.py
@@ -35,7 +35,7 @@ class FDWDPutTestCase(BaseTestGenerator):
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
-        self.fdw_name = "fdw_put_%s".format(str(uuid.uuid4())[1:6])
+        self.fdw_name = "fdw_put_%s".format(str(uuid.uuid4()).replace("-", ""))
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/utils.py b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/utils.py
index d8a9e0b..898e3d3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/foreign_data_wrappers/tests/utils.py
@@ -35,7 +35,7 @@ def get_fdw_data(schema_name, db_user):
             ],
         "fdwoptions": [],
         "fdwowner": db_user,
-        "name": "fdw_add_%s" % (str(uuid.uuid4())[1:6])
+        "name": "fdw_add_%s" % (str(uuid.uuid4()).replace("-", ""))
     }
     return data
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_add.py b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_add.py
index ecd8e96..92ed187 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_add.py
@@ -48,7 +48,7 @@ class LanguagesAddTestCase(BaseTestGenerator):
             "lanowner": db_user,
             "lanproc": "plpgsql_call_handler",
             "lanval": "fmgr_c_validator",
-            "name": "language_%s" % str(uuid.uuid4())[1:4],
+            "name": "language_%s" % str(uuid.uuid4()).replace("-", ""),
             "seclabels": [],
             "template_list":
                 [
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_delete.py b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_delete.py
index cb189bc..19f5f8e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_delete.py
@@ -29,7 +29,7 @@ class LanguagesDeleteTestCase(BaseTestGenerator):
         self.server_id = self.server_data["server_id"]
         self.db_id = self.server_data['db_id']
         self.db_name = self.server_data["db_name"]
-        self.lang_name = "language_%s" % str(uuid.uuid4())[1:4]
+        self.lang_name = "language_%s" % str(uuid.uuid4()).replace("-", "")
 
         db_con = database_utils.connect_database(self,
                                                  utils.SERVER_GROUP,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_get.py b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_get.py
index c4f3829..7e11d4b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_get.py
@@ -29,7 +29,7 @@ class LanguagesGetTestCase(BaseTestGenerator):
         self.server_id = self.server_data["server_id"]
         self.db_id = self.server_data['db_id']
         self.db_name = self.server_data["db_name"]
-        self.lang_name = "language_%s" % str(uuid.uuid4())[1:4]
+        self.lang_name = "language_%s" % str(uuid.uuid4()).replace("-", "")
         db_con = database_utils.connect_database(self,
                                                  utils.SERVER_GROUP,
                                                  self.server_id,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_put.py b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_put.py
index 1df99ea..81e4ab7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/languages/tests/test_language_put.py
@@ -30,7 +30,7 @@ class LanguagesPutTestCase(BaseTestGenerator):
         self.server_id = self.server_data["server_id"]
         self.db_id = self.server_data['db_id']
         self.db_name = self.server_data["db_name"]
-        self.lang_name = "language_%s" % str(uuid.uuid4())[1:4]
+        self.lang_name = "language_%s" % str(uuid.uuid4()).replace("-", "")
         db_con = database_utils.connect_database(self,
                                                  utils.SERVER_GROUP,
                                                  self.server_id,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
index 84b81e7..f7d63a4 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_add.py
@@ -30,7 +30,7 @@ class CollationAddTestCase(BaseTestGenerator):
         self.database_info = parent_node_dict["database"][-1]
         self.db_name = self.database_info["db_name"]
         # Change the db name, so that schema will create in newly created db
-        self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:6]
+        self.schema_name = "schema_get_%s" % str(uuid.uuid4()).replace("-", "")
         connection = utils.get_db_connection(self.db_name,
                                              self.server['username'],
                                              self.server['db_password'],
@@ -59,7 +59,7 @@ class CollationAddTestCase(BaseTestGenerator):
 
         data = {
             "copy_collation": "pg_catalog.\"C\"",
-            "name": "collation_add_%s" % str(uuid.uuid4())[1:6],
+            "name": "collation_add_%s" % str(uuid.uuid4()).replace("-", ""),
             "owner": self.server["username"],
             "schema": schema_name
         }
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_delete.py
index 3729b87..1994c9e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_delete.py
@@ -30,7 +30,7 @@ class CollationDeleteTestCase(BaseTestGenerator):
         self.schema_info = parent_node_dict["schema"][-1]
         self.schema_name = self.schema_info["schema_name"]
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        coll_name = "collation_get_%s" % str(uuid.uuid4())[1:6]
+        coll_name = "collation_get_%s" % str(uuid.uuid4()).replace("-", "")
         self.collation = collation_utils.create_collation(self.server,
                                                           self.schema_name,
                                                           coll_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_get.py
index 411cdeb..9275838 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_get.py
@@ -30,7 +30,7 @@ class CollationGetTestCase(BaseTestGenerator):
         self.schema_info = parent_node_dict["schema"][-1]
         self.schema_name = self.schema_info["schema_name"]
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        coll_name = "collation_get_%s" % str(uuid.uuid4())[1:6]
+        coll_name = "collation_get_%s" % str(uuid.uuid4()).replace("-", "")
         self.collation = collation_utils.create_collation(self.server,
                                                           self.schema_name,
                                                           coll_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_put.py
index b5f38a5..a96e0ff 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/collations/tests/test_collation_put.py
@@ -31,7 +31,7 @@ class CollationPutTestCase(BaseTestGenerator):
         self.schema_info = parent_node_dict["schema"][-1]
         self.schema_name = self.schema_info["schema_name"]
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        coll_name = "collation_get_%s" % str(uuid.uuid4())[1:6]
+        coll_name = "collation_get_%s" % str(uuid.uuid4()).replace("-", "")
         self.collation = collation_utils.create_collation(self.server,
                                                           self.schema_name,
                                                           coll_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_add.py
index cb4dbc4..c2d80d8 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_add.py
@@ -59,7 +59,7 @@ class DomainAddTestCase(BaseTestGenerator):
             "is_tlength": True,
             "max_val": 2147483647,
             "min_val": 1,
-            "name": "domain_add_%s" % (str(uuid.uuid4())[1:6]),
+            "name": "domain_add_%s" % (str(uuid.uuid4()).replace("-", "")),
             "owner": self.server["username"],
             "seclabels": [],
             "typdefault": "1",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_delete.py
index 21f9248..2d3021d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_delete.py
@@ -32,7 +32,7 @@ class DomainDeleteTestCase(BaseTestGenerator):
         self.schema_info = parent_node_dict["schema"][-1]
         self.schema_name = self.schema_info["schema_name"]
         self.schema_id = self.schema_info["schema_id"]
-        self.domain_name = "domain_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.domain_name = "domain_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.domain_info = domain_utils.create_domain(self.server,
                                                       self.db_name,
                                                       self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_get.py
index 17d215a..671efef 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_get.py
@@ -32,7 +32,7 @@ class DomainGetTestCase(BaseTestGenerator):
         self.schema_info = parent_node_dict["schema"][-1]
         self.schema_name = self.schema_info["schema_name"]
         self.schema_id = self.schema_info["schema_id"]
-        self.domain_name = "domain_get_%s" % (str(uuid.uuid4())[1:6])
+        self.domain_name = "domain_get_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.domain_info = domain_utils.create_domain(self.server,
                                                       self.db_name,
                                                       self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_put.py
index b71a1e2..e1b61b0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/domains/tests/test_domain_put.py
@@ -33,7 +33,7 @@ class DomainPutTestCase(BaseTestGenerator):
         self.schema_info = parent_node_dict["schema"][-1]
         self.schema_name = self.schema_info["schema_name"]
         self.schema_id = self.schema_info["schema_id"]
-        self.domain_name = "domain_put_%s" % (str(uuid.uuid4())[1:6])
+        self.domain_name = "domain_put_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.domain_info = domain_utils.create_domain(self.server,
                                                       self.db_name,
                                                       self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_add.py
index 3dcf456..d5d96c3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_add.py
@@ -43,8 +43,8 @@ class ForeignTableAddTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.schema_id = self.schema_data['schema_id']
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
         self.fsrv_id = fsrv_utils.create_fsrv(self.server, self.db_name,
@@ -81,7 +81,7 @@ class ForeignTableAddTestCase(BaseTestGenerator):
             "ftoptions": [],
             "inherits": [],
             "ftsrvname": self.fsrv_name,
-            "name": "ft_%s" % (str(uuid.uuid4())[1:4]),
+            "name": "ft_%s" % (str(uuid.uuid4()).replace("-", "")),
             "owner": self.server["username"],
             "relacl": [],
             "seclabels": [],
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_delete.py
index 731e32b..0da1ddc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_delete.py
@@ -43,9 +43,9 @@ class ForeignTableDeleteTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.schema_id = self.schema_data['schema_id']
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
-        self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:4])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.ft_name = "ft_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
         self.fsrv_id = fsrv_utils.create_fsrv(self.server, self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_get.py
index 329bd34..73cb8d5 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_get.py
@@ -42,9 +42,9 @@ class ForeignTableGetTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.schema_id = self.schema_data['schema_id']
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
-        self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:4])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.ft_name = "ft_%s" % (str(uuid.uuid4()).replace("-", ""))
 
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_put.py
index ee21904..45f75c7 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/foreign_tables/tests/test_foreign_table_put.py
@@ -43,9 +43,9 @@ class ForeignTablePutTestCase(BaseTestGenerator):
         self.db_name = parent_node_dict["database"][-1]["db_name"]
         self.schema_name = self.schema_data['schema_name']
         self.schema_id = self.schema_data['schema_id']
-        self.fdw_name = "fdw_%s" % (str(uuid.uuid4())[1:4])
-        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4())[1:4])
-        self.ft_name = "ft_%s" % (str(uuid.uuid4())[1:4])
+        self.fdw_name = "fdw_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.fsrv_name = "fsrv_%s" % (str(uuid.uuid4()).replace("-", ""))
+        self.ft_name = "ft_%s" % (str(uuid.uuid4()).replace("-", ""))
 
         self.fdw_id = fdw_utils.create_fdw(self.server, self.db_name,
                                            self.fdw_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_add.py
index 55a0be8..02bf578 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_add.py
@@ -41,7 +41,7 @@ class FTSConfiguraionAddTestCase(BaseTestGenerator):
         self.server_id = schema_data['server_id']
         self.db_id = schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
+        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_parser_id = fts_parser_utils.create_fts_parser(self.server,
                                                                 self.db_name,
@@ -67,7 +67,7 @@ class FTSConfiguraionAddTestCase(BaseTestGenerator):
 
         data = \
             {
-                "name": "fts_conf_%s" % str(uuid.uuid4())[1:4],
+                "name": "fts_conf_%s" % str(uuid.uuid4()).replace("-", ""),
                 "owner": self.server["username"],
                 "prsname": "%s.%s" % (self.schema_name, self.fts_parser_name),
                 "schema": self.schema_id,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_delete.py
index 3ab0d81..e499a56 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_delete.py
@@ -39,7 +39,7 @@ class FTSConfDeleteTestCase(BaseTestGenerator):
         self.server_id = schema_data['server_id']
         self.db_id = schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
+        self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_conf_id = fts_configuration_utils.create_fts_configuration(
             self.server, self.db_name, self.schema_name, self.fts_conf_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get.py
index b148db3..16dc176 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_get.py
@@ -39,7 +39,7 @@ class FTSConfGetTestCase(BaseTestGenerator):
         self.server_id = schema_data['server_id']
         self.db_id = schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
+        self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_conf_id = fts_configuration_utils.create_fts_configuration(
             self.server, self.db_name, self.schema_name, self.fts_conf_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_put.py
index 1c66543..99419f9 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_configurations/tests/test_fts_configuration_put.py
@@ -40,7 +40,7 @@ class FTSConfPutTestCase(BaseTestGenerator):
         self.server_id = schema_data['server_id']
         self.db_id = schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4())[1:4]
+        self.fts_conf_name = "fts_conf_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_conf_id = fts_configuration_utils.create_fts_configuration(
             self.server, self.db_name, self.schema_name, self.fts_conf_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_add.py
index bb484ba..a09492b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_add.py
@@ -55,7 +55,7 @@ class FtsDictionaryAddTestCase(BaseTestGenerator):
 
         data = \
             {
-                "name": "fts_dict_%s" % str(uuid.uuid4())[1:4],
+                "name": "fts_dict_%s" % str(uuid.uuid4()).replace("-", ""),
                 "options": [
                     {
                         "value": "synonym_sample",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_delete.py
index a76bea5..a4d0b1e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_delete.py
@@ -38,7 +38,7 @@ class FtsDictionaryDeleteTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
+        self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_dict_id = fts_dict_utils.create_fts_dictionary(
             self.server,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_get.py
index 966ece4..f006399 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_get.py
@@ -38,7 +38,7 @@ class FtsDictionaryGetTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
+        self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_dict_id = fts_dict_utils.create_fts_dictionary(
             self.server,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_put.py
index ee04320..a2d1a63 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_dictionaries/tests/test_fts_dictionaries_put.py
@@ -39,7 +39,7 @@ class FtsDictionaryPutTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4())[1:4]
+        self.fts_dict_name = "fts_dict_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_dict_id = fts_dict_utils.create_fts_dictionary(
             self.server,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_add.py
index 3ae500b..fffff36 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_add.py
@@ -54,7 +54,7 @@ class FtsParserAddTestCase(BaseTestGenerator):
 
         self.data = \
             {
-                "name": "fts_parser_%s" % str(uuid.uuid4())[1:4],
+                "name": "fts_parser_%s" % str(uuid.uuid4()).replace("-", ""),
                 "schema": self.schema_id,
                 "prsend": "prsd_end",
                 "prsheadline": "prsd_headline",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_delete.py
index b651630..6503389 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_delete.py
@@ -37,7 +37,7 @@ class FtsParserDeleteTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
+        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_parser_id = fts_parser_utils.create_fts_parser(
             self.server,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_get.py
index 07c8eea..706e706 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_get.py
@@ -37,7 +37,7 @@ class FtsParserGetTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
+        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_parser_id = fts_parser_utils.create_fts_parser(
             self.server,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_put.py
index 7eb17b2..76c8075 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_parser/tests/test_fts_parser_put.py
@@ -38,7 +38,7 @@ class FtsParserPutTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4())[1:4]
+        self.fts_parser_name = "fts_parser_%s" % str(uuid.uuid4()).replace("-", "")
 
         self.fts_parser_id = fts_parser_utils.create_fts_parser(
             self.server,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_add.py
index 8683ff2..32e6d1f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_add.py
@@ -56,7 +56,7 @@ class FtsTemplateAddTestCase(BaseTestGenerator):
 
         self.data = \
             {
-                "name": "fts_temp_%s" % str(uuid.uuid4())[1:4],
+                "name": "fts_temp_%s" % str(uuid.uuid4()).replace("-", ""),
                 "schema": self.schema_id,
                 "tmplinit": "dispell_init",
                 "tmpllexize": "dispell_lexize"
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_delete.py
index 68cb823..d1fa185 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_delete.py
@@ -36,7 +36,7 @@ class FtsTemplateDeleteTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
+        self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4()).replace("-", "")
         self.fts_temp_id = fts_temp_utils.create_fts_template(
             self.server,
             self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_get.py
index cff9696..1e8fb8f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_get.py
@@ -36,7 +36,7 @@ class FtsTemplateGetTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
+        self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4()).replace("-", "")
         self.fts_temp_id = fts_temp_utils.create_fts_template(
             self.server,
             self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_put.py
index 3d314f5..ad9789a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/fts_templates/tests/test_fts_templates_put.py
@@ -37,7 +37,7 @@ class FtsTemplatePutTestCase(BaseTestGenerator):
         self.server_id = self.schema_data['server_id']
         self.db_id = self.schema_data['db_id']
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4())[1:4]
+        self.fts_temp_name = "fts_temp_%s" % str(uuid.uuid4()).replace("-", "")
         self.fts_temp_id = fts_temp_utils.create_fts_template(
             self.server,
             self.db_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_add.py
index dcbf9ff..445eeaf 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_add.py
@@ -95,7 +95,7 @@ class TriggerFuncAddTestCase(BaseTestGenerator):
         trigger_func_types = data['prorettypename'].split('/')
         for func_type in trigger_func_types:
             data['prorettypename'] = func_type
-            data["name"] = "test_event_add_%s" % str(uuid.uuid4())[1:6]
+            data["name"] = "test_event_add_%s" % str(uuid.uuid4()).replace("-", "")
             if schema_id:
                 data['pronamespace'] = schema_id
             else:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_delete.py
index a8bd216..acbff4f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_delete.py
@@ -38,7 +38,7 @@ class TriggerFuncDeleteTestCase(BaseTestGenerator):
         schema_info = parent_node_dict["schema"][-1]
         server_id = schema_info["server_id"]
         db_id = schema_info["db_id"]
-        func_name = "test_event_delete_%s" % str(uuid.uuid4())[1:6]
+        func_name = "test_event_delete_%s" % str(uuid.uuid4()).replace("-", "")
         server_con = server_utils.connect_server(self, server_id)
         if not server_con["info"] == "Server connected.":
             raise Exception("Could not connect to server to add resource "
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_get.py
index a5abaa7..73242dd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_get.py
@@ -38,7 +38,7 @@ class TriggerFuncGetTestCase(BaseTestGenerator):
         schema_info = parent_node_dict["schema"][-1]
         server_id = schema_info["server_id"]
         db_id = schema_info["db_id"]
-        func_name = "test_event_get_%s" % str(uuid.uuid4())[1:6]
+        func_name = "test_event_get_%s" % str(uuid.uuid4()).replace("-", "")
         db_user = self.server["username"]
         server_con = server_utils.connect_server(self, server_id)
         if not server_con["info"] == "Server connected.":
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_put.py
index a5fbe18..1dbc38b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/functions/tests/test_trigger_func_put.py
@@ -39,7 +39,7 @@ class TriggerFuncPutTestCase(BaseTestGenerator):
         schema_info = parent_node_dict["schema"][-1]
         server_id = schema_info["server_id"]
         db_id = schema_info["db_id"]
-        func_name = "test_event_put_%s" % str(uuid.uuid4())[1:6]
+        func_name = "test_event_put_%s" % str(uuid.uuid4()).replace("-", "")
         server_con = server_utils.connect_server(self, server_id)
         if not server_con["info"] == "Server connected.":
             raise Exception("Could not connect to server to add resource "
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_add.py
index 144e148..9153848 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_add.py
@@ -64,7 +64,7 @@ class PackageAddTestCase(BaseTestGenerator):
 
         data = \
             {
-                "name": "pkg_%s" % str(uuid.uuid4())[1:4],
+                "name": "pkg_%s" % str(uuid.uuid4()).replace("-", ""),
                 "owner": self.server["username"],
                 "pkgacl": [],
                 "pkgbodysrc": "PROCEDURE p1() is \n"
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_delete.py
index 1d767e8..910d780 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_delete.py
@@ -35,8 +35,8 @@ class PackageDeleteTestCase(BaseTestGenerator):
         self.schema_id = schema_info["schema_id"]
         self.schema_name = schema_info["schema_name"]
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:4]
-        self.proc_name = "proc_%s" % str(uuid.uuid4())[1:4]
+        self.pkg_name= "pkg_%s" % str(uuid.uuid4()).replace("-", "")
+        self.proc_name = "proc_%s" % str(uuid.uuid4()).replace("-", "")
         self.server_id = schema_info["server_id"]
         self.db_id = schema_info["db_id"]
         server_con = server_utils.connect_server(self, self.server_id)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_get.py
index 87e7d9a..afc22b2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_get.py
@@ -35,8 +35,8 @@ class PackageGetTestCase(BaseTestGenerator):
         self.schema_id = schema_info["schema_id"]
         self.schema_name = schema_info["schema_name"]
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:4]
-        self.proc_name = "proc_%s" % str(uuid.uuid4())[1:4]
+        self.pkg_name= "pkg_%s" % str(uuid.uuid4()).replace("-", "")
+        self.proc_name = "proc_%s" % str(uuid.uuid4()).replace("-", "")
         self.server_id = schema_info["server_id"]
         self.db_id = schema_info["db_id"]
         server_con = server_utils.connect_server(self, self.server_id)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_put.py
index 2c960e2..9c0ce05 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/packages/tests/test_package_put.py
@@ -36,8 +36,8 @@ class PackagePutTestCase(BaseTestGenerator):
         self.schema_id = schema_info["schema_id"]
         self.schema_name = schema_info["schema_name"]
         self.db_name = parent_node_dict["database"][-1]["db_name"]
-        self.pkg_name= "pkg_%s" % str(uuid.uuid4())[1:4]
-        self.proc_name = "proc_%s" % str(uuid.uuid4())[1:4]
+        self.pkg_name= "pkg_%s" % str(uuid.uuid4()).replace("-", "")
+        self.proc_name = "proc_%s" % str(uuid.uuid4()).replace("-", "")
         self.server_id = schema_info["server_id"]
         self.db_id = schema_info["db_id"]
         server_con = server_utils.connect_server(self, self.server_id)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_add.py
index 583b514..f82f119 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_add.py
@@ -53,7 +53,7 @@ class SequenceAddTestCase(BaseTestGenerator):
             "increment": "1",
             "maximum": "100000",
             "minimum": "1",
-            "name": "test_sequence_add_%s" % (str(uuid.uuid4())[1:6]),
+            "name": "test_sequence_add_%s" % (str(uuid.uuid4()).replace("-", "")),
             "relacl": [
                 {
                     "grantee": db_user,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_delete.py
index a6f6f41..083b552 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_delete.py
@@ -42,7 +42,7 @@ class SequenceDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add sequence.")
-        self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:6]
+        self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_get.py
index 56afcc2..0a7a421 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_get.py
@@ -42,7 +42,7 @@ class SequenceGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add sequence.")
-        self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:6]
+        self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_put.py
index e7c3344..143d38c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/sequences/tests/test_sequence_put.py
@@ -43,7 +43,7 @@ class SequencePutTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add sequence.")
-        self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4())[1:6]
+        self.sequence_name = "test_sequence_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_add.py
index 53c3fca..0bad264 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_add.py
@@ -53,7 +53,7 @@ class SynonymAddTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to add the synonym.")
         self.sequence_name = "test_sequence_synonym_%s" % \
-                             str(uuid.uuid4())[1:6]
+                             str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
 
@@ -68,7 +68,7 @@ class SynonymAddTestCase(BaseTestGenerator):
             "synobjname": self.sequence_name,
             "synobjschema": self.schema_name,
             "targettype": "Sequence",
-            "name": "synonym_add_%s" % (str(uuid.uuid4())[1:6])
+            "name": "synonym_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         }
 
         response = self.tester.post(
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_delete.py
index cb6d69b..a5eb74e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_delete.py
@@ -53,10 +53,10 @@ class SynonymDeleteTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to add the synonym.")
         self.sequence_name = "test_sequence_synonym_%s" % \
-                             str(uuid.uuid4())[1:6]
+                             str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
-        self.synonym_name = "test_synonym_delete_%s" % str(uuid.uuid4())[1:6]
+        self.synonym_name = "test_synonym_delete_%s" % str(uuid.uuid4()).replace("-", "")
         synonym_utils.create_synonym(self.server,
                                      self.db_name,
                                      self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_get.py
index 4fdbd06..ca2238c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_get.py
@@ -53,10 +53,10 @@ class SynonymGetTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to add the synonym.")
         self.sequence_name = "test_sequence_synonym_%s" % \
-                             str(uuid.uuid4())[1:6]
+                             str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
-        self.synonym_name = "test_synonym_get_%s" % str(uuid.uuid4())[1:6]
+        self.synonym_name = "test_synonym_get_%s" % str(uuid.uuid4()).replace("-", "")
         synonym_utils.create_synonym(self.server,
                                      self.db_name,
                                      self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_put.py
index 0391add..f57f170 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/synonyms/tests/test_synonym_put.py
@@ -61,10 +61,10 @@ class SynonymPutTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to add the synonym.")
         self.sequence_name = "test_sequence_synonym_%s" % \
-                             str(uuid.uuid4())[1:6]
+                             str(uuid.uuid4()).replace("-", "")
         self.sequence_id = sequence_utils.create_sequences(
             self.server, self.db_name, self.schema_name, self.sequence_name)
-        self.synonym_name = "test_synonym_put_%s" % str(uuid.uuid4())[1:6]
+        self.synonym_name = "test_synonym_put_%s" % str(uuid.uuid4()).replace("-", "")
         synonym_utils.create_synonym(self.server,
                                      self.db_name,
                                      self.schema_name,
@@ -79,7 +79,7 @@ class SynonymPutTestCase(BaseTestGenerator):
                                                         self.synonym_name)
         if not synonym_response:
             raise Exception("No synonym node to update.")
-        func_name = "test_function_synonym_%s" % str(uuid.uuid4())[1:6]
+        func_name = "test_function_synonym_%s" % str(uuid.uuid4()).replace("-", "")
         self.table_id = functions_utils.create_trigger_function(
             self.server, self.db_name, self.schema_name, func_name,
             self.server_version)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py
index 6fc8b05..e621a27 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_add.py
@@ -43,14 +43,14 @@ class ColumnAddTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
 
     def runTest(self):
         """This function will add column under table node."""
-        self.column_name = "test_column_add_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         data = {"name": self.column_name,
                 "cltype": "\"char\"",
                 "attacl": [],
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_delete.py
index d558cee..0316296 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_delete.py
@@ -43,11 +43,11 @@ class ColumnDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.column_id = columns_utils.create_column(self.server,
                                                      self.db_name,
                                                      self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_get.py
index 4adfbef..1b628a3 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_get.py
@@ -43,11 +43,11 @@ class ColumnGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.column_id = columns_utils.create_column(self.server,
                                                      self.db_name,
                                                      self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_put.py
index 656cb83..b3846ea 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/column/tests/test_column_put.py
@@ -44,11 +44,11 @@ class ColumnPutTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.column_name = "test_column_put_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_put_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.column_id = columns_utils.create_column(self.server,
                                                      self.db_name,
                                                      self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_add.py
index 1e28d51..8ac1e3a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_add.py
@@ -47,7 +47,7 @@ class CheckConstraintAddTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to add a check "
                             "constraint.")
         self.table_name = "table_checkconstraint_add_%s" % \
-                          (str(uuid.uuid4())[1:6])
+                          (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server,
                                                   self.db_name,
                                                   self.schema_name,
@@ -56,7 +56,7 @@ class CheckConstraintAddTestCase(BaseTestGenerator):
     def runTest(self):
         """This function will add check constraint to table."""
         check_constraint_name = "test_checkconstraint_add_%s" % \
-                                (str(uuid.uuid4())[1:6])
+                                (str(uuid.uuid4()).replace("-", ""))
         data = {"name": check_constraint_name,
                 "consrc": " (id > 0)",
                 "convalidated": True,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_delete.py
index 0dd361d..b2555ca 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_delete.py
@@ -47,13 +47,13 @@ class CheckConstraintDeleteTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to delete a check "
                             "constraint.")
         self.table_name = "table_checkconstraint_delete_%s" % \
-                          (str(uuid.uuid4())[1:6])
+                          (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server,
                                                   self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
         self.check_constraint_name = "test_checkconstraint_delete_%s" % \
-                                     (str(uuid.uuid4())[1:6])
+                                     (str(uuid.uuid4()).replace("-", ""))
         self.check_constraint_id = \
             chk_constraint_utils.create_check_constraint(
                 self.server, self.db_name, self.schema_name, self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_get.py
index ee94bbc..2b1e7c0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_get.py
@@ -47,13 +47,13 @@ class CheckConstraintGetTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to fetch a check "
                             "constraint.")
         self.table_name = "table_checkconstraint_get_%s" % \
-                          (str(uuid.uuid4())[1:6])
+                          (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server,
                                                   self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
         self.check_constraint_name = "test_checkconstraint_get_%s" % \
-                                     (str(uuid.uuid4())[1:6])
+                                     (str(uuid.uuid4()).replace("-", ""))
         self.check_constraint_id = \
             chk_constraint_utils.create_check_constraint(
                 self.server, self.db_name, self.schema_name, self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_put.py
index 6192ae5..226bd36 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/check_constraint/tests/test_check_constraint_put.py
@@ -48,13 +48,13 @@ class CheckConstraintPutTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to update a check "
                             "constraint.")
         self.table_name = "table_checkconstraint_put_%s" % \
-                          (str(uuid.uuid4())[1:6])
+                          (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server,
                                                   self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
         self.check_constraint_name = "test_checkconstraint_put_%s" % \
-                                     (str(uuid.uuid4())[1:6])
+                                     (str(uuid.uuid4()).replace("-", ""))
         self.check_constraint_id = \
             chk_constraint_utils.create_check_constraint(
                 self.server, self.db_name, self.schema_name, self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_add.py
index dfd4e63..daa374c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_add.py
@@ -21,7 +21,7 @@ from regression import parent_node_dict
 from regression.python_test_utils import test_utils as utils
 
 
-class ForeignKeyAddTestCase(BaseTestGenerator):
+class fkAddTestCase(BaseTestGenerator):
     """This class will add foreign key to existing table"""
     scenarios = [
         ('Add foreign Key constraint to table',
@@ -46,23 +46,23 @@ class ForeignKeyAddTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to add a foreign "
                             "key constraint.")
-        self.local_table_name = "table_foreignkey_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.local_table_name = "table_fk_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.local_table_id = tables_utils.create_table(self.server,
                                                         self.db_name,
                                                         self.schema_name,
                                                         self.local_table_name)
-        self.foreign_table_name = "table_foreignkey_%s" % \
-                                  (str(uuid.uuid4())[1:6])
+        self.foreign_table_name = "table_fk_%s" % \
+                                  (str(uuid.uuid4()).replace("-", ""))
         self.foreign_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name,
             self.foreign_table_name)
 
     def runTest(self):
         """This function will add foreign key table column."""
-        foreignkey_name = "test_foreignkey_add_%s" % \
-                          (str(uuid.uuid4())[1:6])
-        data = {"name": foreignkey_name,
+        fk_name = "test_fk_add_%s" % \
+                          (str(uuid.uuid4()).replace("-", ""))
+        data = {"name": fk_name,
                 "columns": [{"local_column": "id",
                              "references": self.foreign_table_id,
                              "referenced": "id"}],
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_delete.py
index 166d6b1..59f4b11 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_delete.py
@@ -47,17 +47,17 @@ class ForeignKeyDeleteTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to delete a foreign "
                             "key constraint.")
-        self.local_table_name = "local_table_foreignkey_delete_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.local_table_name = "local_table_fk_delete_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.local_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name, self.local_table_name)
-        self.foreign_table_name = "foreign_table_foreignkey_delete_%s" % \
-                                  (str(uuid.uuid4())[1:6])
+        self.foreign_table_name = "foreign_table_fk_delete_%s" % \
+                                  (str(uuid.uuid4()).replace("-", ""))
         self.foreign_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name,
             self.foreign_table_name)
-        self.foreign_key_name = "test_foreignkey_delete_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.foreign_key_name = "test_fk_delete_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.foreign_key_id = fk_utils.create_foreignkey(
             self.server, self.db_name, self.schema_name, self.local_table_name,
             self.foreign_table_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_get.py
index 55b4929..4d7fa13 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_get.py
@@ -21,7 +21,7 @@ from regression.python_test_utils import test_utils as utils
 from . import utils as fk_utils
 
 
-class ForeignGetDeleteTestCase(BaseTestGenerator):
+class ForeignKeyGetTestCase(BaseTestGenerator):
     """This class will fetch foreign key from existing table"""
     scenarios = [
         ('Fetch foreign Key constraint.',
@@ -47,17 +47,17 @@ class ForeignGetDeleteTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to fetch a foreign "
                             "key constraint.")
-        self.local_table_name = "local_table_foreignkey_get_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.local_table_name = "local_table_fk_get_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.local_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name, self.local_table_name)
-        self.foreign_table_name = "foreign_table_foreignkey_get_%s" % \
-                                  (str(uuid.uuid4())[1:6])
+        self.foreign_table_name = "foreign_table_fk_get_%s" % \
+                                  (str(uuid.uuid4()).replace("-", ""))
         self.foreign_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name,
             self.foreign_table_name)
-        self.foreign_key_name = "test_foreignkey_get_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.foreign_key_name = "test_fk_get_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.foreign_key_id = fk_utils.create_foreignkey(
             self.server, self.db_name, self.schema_name, self.local_table_name,
             self.foreign_table_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_put.py
index 1668fdb..077985e 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/foreign_key/tests/test_foreign_key_put.py
@@ -22,7 +22,7 @@ from regression.python_test_utils import test_utils as utils
 from . import utils as fk_utils
 
 
-class ForeignPutDeleteTestCase(BaseTestGenerator):
+class ForeignKeyPutTestCase(BaseTestGenerator):
     """This class will update foreign key from existing table"""
     scenarios = [
         ('Fetch foreign Key constraint.',
@@ -48,17 +48,17 @@ class ForeignPutDeleteTestCase(BaseTestGenerator):
         if not schema_response:
             raise Exception("Could not find the schema to fetch a foreign "
                             "key constraint.")
-        self.local_table_name = "local_table_foreignkey_get_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.local_table_name = "local_table_fk_get_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.local_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name, self.local_table_name)
-        self.foreign_table_name = "foreign_table_foreignkey_get_%s" % \
-                                  (str(uuid.uuid4())[1:6])
+        self.foreign_table_name = "foreign_table_fk_get_%s" % \
+                                  (str(uuid.uuid4()).replace("-", ""))
         self.foreign_table_id = tables_utils.create_table(
             self.server, self.db_name, self.schema_name,
             self.foreign_table_name)
-        self.foreign_key_name = "test_foreignkey_get_%s" % \
-                                (str(uuid.uuid4())[1:6])
+        self.foreign_key_name = "test_fk_get_%s" % \
+                                (str(uuid.uuid4()).replace("-", ""))
         self.foreign_key_id = fk_utils.create_foreignkey(
             self.server, self.db_name, self.schema_name, self.local_table_name,
             self.foreign_table_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_add.py
index 7e8a901..cfccc6d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_add.py
@@ -25,13 +25,13 @@ class IndexConstraintAddTestCase(BaseTestGenerator):
     """This class will add index constraint(primary key or unique key) to
     table column"""
     primary_key_name = "test_primarykey_add_%s" % \
-                       (str(uuid.uuid4())[1:6])
+                       (str(uuid.uuid4()).replace("-", ""))
     primary_key_data = {"name": primary_key_name,
                         "spcname": "pg_default",
                         "columns": [{"column": "id"}]
                         }
     unique_key_name = "test_uniquekey_add_%s" % \
-                      (str(uuid.uuid4())[1:6])
+                      (str(uuid.uuid4()).replace("-", ""))
     unique_key_data = {"name": unique_key_name,
                        "spcname": "pg_default",
                        "columns": [{"column": "id"}]}
@@ -62,7 +62,7 @@ class IndexConstraintAddTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to add a index "
                             "constraint(primary key or unique key).")
         cls.table_name = "table_indexconstraint_%s" % \
-                         (str(uuid.uuid4())[1:6])
+                         (str(uuid.uuid4()).replace("-", ""))
         cls.table_id = tables_utils.create_table(cls.server,
                                                  cls.db_name,
                                                  cls.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_delete.py
index c9492d0..fa98a5f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_delete.py
@@ -25,9 +25,9 @@ class IndexConstraintDeleteTestCase(BaseTestGenerator):
     """This class will delete index constraint(primary key or unique key) of
     table column"""
     primary_key_name = "test_primarykey_delete_%s" % \
-                       (str(uuid.uuid4())[1:6])
+                       (str(uuid.uuid4()).replace("-", ""))
     unique_key_name = "test_uniquekey_delete_%s" % \
-                      (str(uuid.uuid4())[1:6])
+                      (str(uuid.uuid4()).replace("-", ""))
     scenarios = [
         ('Delete primary Key constraint of table',
          dict(url='/browser/primary_key/obj/', name=primary_key_name,
@@ -57,7 +57,7 @@ class IndexConstraintDeleteTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to add a index "
                             "constraint(primary key or unique key).")
         cls.table_name = "table_indexconstraint_%s" % \
-                         (str(uuid.uuid4())[1:6])
+                         (str(uuid.uuid4()).replace("-", ""))
         cls.table_id = tables_utils.create_table(cls.server,
                                                  cls.db_name,
                                                  cls.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_get.py
index be126f6..baf9f44 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_get.py
@@ -25,9 +25,9 @@ class IndexConstraintGetTestCase(BaseTestGenerator):
     """This class will fetch the index constraint(primary key or unique key) of
     table column"""
     primary_key_name = "test_primarykey_delete_%s" % \
-                       (str(uuid.uuid4())[1:6])
+                       (str(uuid.uuid4()).replace("-", ""))
     unique_key_name = "test_uniquekey_delete_%s" % \
-                      (str(uuid.uuid4())[1:6])
+                      (str(uuid.uuid4()).replace("-", ""))
     scenarios = [
         ('Fetch primary Key constraint of table',
          dict(url='/browser/primary_key/obj/', name=primary_key_name,
@@ -57,7 +57,7 @@ class IndexConstraintGetTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to add a index "
                             "constraint(primary key or unique key).")
         cls.table_name = "table_indexconstraint_%s" % \
-                         (str(uuid.uuid4())[1:6])
+                         (str(uuid.uuid4()).replace("-", ""))
         cls.table_id = tables_utils.create_table(cls.server,
                                                  cls.db_name,
                                                  cls.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_put.py
index c9e1be8..cfe7f0a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/constraints/index_constraint/tests/test_index_constraint_put.py
@@ -26,9 +26,9 @@ class IndexConstraintUpdateTestCase(BaseTestGenerator):
     """This class will update index constraint(primary key or unique key) of
     table column"""
     primary_key_name = "test_primarykey_put_%s" % \
-                       (str(uuid.uuid4())[1:6])
+                       (str(uuid.uuid4()).replace("-", ""))
     unique_key_name = "test_uniquekey_put_%s" % \
-                      (str(uuid.uuid4())[1:6])
+                      (str(uuid.uuid4()).replace("-", ""))
     data = {"oid": "", "comment": "this is test comment"}
     scenarios = [
         ('Update primary Key constraint of table',
@@ -59,7 +59,7 @@ class IndexConstraintUpdateTestCase(BaseTestGenerator):
             raise Exception("Could not find the schema to add a index "
                             "constraint(primary key or unique key).")
         cls.table_name = "table_indexconstraint_%s" % \
-                         (str(uuid.uuid4())[1:6])
+                         (str(uuid.uuid4()).replace("-", ""))
         cls.table_id = tables_utils.create_table(cls.server,
                                                  cls.db_name,
                                                  cls.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py
index 4a03a1a..963c1a6 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_add.py
@@ -43,14 +43,14 @@ class IndexesAddTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_for_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_for_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
 
     def runTest(self):
         """This function will add index to existing table column."""
-        self.index_name = "test_index_add_%s" % (str(uuid.uuid4())[1:6])
+        self.index_name = "test_index_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         data = {"name": self.index_name,
                 "spcname": "pg_default",
                 "amname": "btree",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_delete.py
index a00ce81..a8275b1 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_delete.py
@@ -45,17 +45,17 @@ class IndexesDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.column_id = columns_utils.create_column(self.server,
                                                      self.db_name,
                                                      self.schema_name,
                                                      self.table_name,
                                                      self.column_name)
-        self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.index_name = "test_index_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.index_id = indexes_utils.create_index(self.server, self.db_name,
                                                    self.schema_name,
                                                    self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py
index a3d3c3b..2265e39 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_get.py
@@ -45,17 +45,17 @@ class IndexesGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.column_id = columns_utils.create_column(self.server,
                                                      self.db_name,
                                                      self.schema_name,
                                                      self.table_name,
                                                      self.column_name)
-        self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.index_name = "test_index_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.index_id = indexes_utils.create_index(self.server, self.db_name,
                                                    self.schema_name,
                                                    self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_put.py
index 148f856..0d02830 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/indexes/tests/test_indexes_put.py
@@ -46,17 +46,17 @@ class IndexesUpdateTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.column_name = "test_column_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.column_id = columns_utils.create_column(self.server,
                                                      self.db_name,
                                                      self.schema_name,
                                                      self.table_name,
                                                      self.column_name)
-        self.index_name = "test_index_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.index_name = "test_index_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.index_id = indexes_utils.create_index(self.server, self.db_name,
                                                    self.schema_name,
                                                    self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_add.py
index dd8a4cb..e558f4c 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_add.py
@@ -43,14 +43,14 @@ class RulesAddTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a rule.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
 
     def runTest(self):
         """This function will rule under table node."""
-        rule_name = "test_rule_add_%s" % (str(uuid.uuid4())[1:6])
+        rule_name = "test_rule_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         data = {"schema": self.schema_name,
                 "view": self.table_name,
                 "name": rule_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_delete.py
index b0c99dd..19d0458 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_delete.py
@@ -43,11 +43,11 @@ class RulesDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to delete rule.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.rule_id = rules_utils.create_rule(self.server, self.db_name,
                                                self.schema_name,
                                                self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_get.py
index b349878..fbf14ef 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_get.py
@@ -43,11 +43,11 @@ class RulesGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to delete rule.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.rule_id = rules_utils.create_rule(self.server, self.db_name,
                                                self.schema_name,
                                                self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_put.py
index a042580..1579246 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/rules/tests/test_rules_put.py
@@ -44,11 +44,11 @@ class RulesUpdateTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to delete rule.")
-        self.table_name = "table_column_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_column_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.rule_name = "test_rule_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.rule_id = rules_utils.create_rule(self.server, self.db_name,
                                                self.schema_name,
                                                self.table_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_add.py
index 9e4846c..43f7e8a 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_add.py
@@ -72,7 +72,7 @@ class TableAddTestCase(BaseTestGenerator):
     def runTest(self):
         """ This function will add table under schema node. """
         db_user = self.server["username"]
-        self.table_name = "test_table_add_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "test_table_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         data = {
             "check_constraint": [],
             "coll_inherits": "[]",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_delete.py
index 9749fed..a1911db 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_delete.py
@@ -42,7 +42,7 @@ class TableDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "test_table_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "test_table_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_get.py
index 2a1d969..4cd784b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_get.py
@@ -42,7 +42,7 @@ class TableGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "test_table_get_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "test_table_get_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_put.py
index ef476d7..cb1053f 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/tests/test_table_put.py
@@ -86,7 +86,7 @@ class TableUpdateTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a table.")
-        self.table_name = "test_table_put_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "test_table_put_%s" % (str(uuid.uuid4()).replace("-", ""))
 
         self.is_partition = False
         if hasattr(self, 'server_min_version'):
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_add.py
index f2398aa..4860dc2 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_add.py
@@ -45,18 +45,18 @@ class TriggersAddTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to add a trigger.")
-        self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_trigger_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.func_name = "trigger_func_add_%s" % str(uuid.uuid4())[1:6]
+        self.func_name = "trigger_func_add_%s" % str(uuid.uuid4()).replace("-", "")
         self.function_info = \
             trigger_funcs_utils.create_trigger_function_with_trigger(
             self.server, self.db_name, self.schema_name, self.func_name)
 
     def runTest(self):
         """This function will trigger under table node."""
-        trigger_name = "test_trigger_add_%s" % (str(uuid.uuid4())[1:6])
+        trigger_name = "test_trigger_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         data = {"name": trigger_name,
                 "is_row_trigger": True,
                 "fires": "BEFORE",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_delete.py
index 1ea4bde..12fd380 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_delete.py
@@ -45,15 +45,15 @@ class TriggersDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to delete trigger.")
-        self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_trigger_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.func_name = "trigger_func_delete_%s" % str(uuid.uuid4())[1:6]
+        self.func_name = "trigger_func_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.function_info = \
             trigger_funcs_utils.create_trigger_function_with_trigger(
             self.server, self.db_name, self.schema_name, self.func_name)
-        self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.trigger_id = triggers_utils.create_trigger(self.server,
                                                         self.db_name,
                                                         self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_get.py
index 58dd929..ee948cc 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_get.py
@@ -45,15 +45,15 @@ class TriggersGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to get a trigger.")
-        self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_trigger_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.func_name = "trigger_func_get_%s" % str(uuid.uuid4())[1:6]
+        self.func_name = "trigger_func_get_%s" % str(uuid.uuid4()).replace("-", "")
         self.function_info = \
             trigger_funcs_utils.create_trigger_function_with_trigger(
             self.server, self.db_name, self.schema_name, self.func_name)
-        self.trigger_name = "test_trigger_get_%s" % (str(uuid.uuid4())[1:6])
+        self.trigger_name = "test_trigger_get_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.trigger_id = triggers_utils.create_trigger(self.server,
                                                         self.db_name,
                                                         self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_put.py
index 7166c1f..372c8dd 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tables/triggers/tests/test_triggers_put.py
@@ -47,15 +47,15 @@ class TriggersUpdateTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to update a trigger.")
-        self.table_name = "table_trigger_%s" % (str(uuid.uuid4())[1:6])
+        self.table_name = "table_trigger_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.table_id = tables_utils.create_table(self.server, self.db_name,
                                                   self.schema_name,
                                                   self.table_name)
-        self.func_name = "trigger_func_add_%s" % str(uuid.uuid4())[1:6]
+        self.func_name = "trigger_func_add_%s" % str(uuid.uuid4()).replace("-", "")
         self.function_info = \
             trigger_funcs_utils.create_trigger_function_with_trigger(
             self.server, self.db_name, self.schema_name, self.func_name)
-        self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.trigger_name = "test_trigger_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.trigger_id = triggers_utils.create_trigger(self.server,
                                                         self.db_name,
                                                         self.schema_name,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_add.py
index 9a98dcc..b574b9d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_add.py
@@ -42,7 +42,7 @@ class SchemaAddTestCase(BaseTestGenerator):
             "defseqacl": [],
             "deftblacl": [],
             "deftypeacl": [],
-            "name": "test_schema_{0}".format(str(uuid.uuid4())[1:6]),
+            "name": "test_schema_{0}".format(str(uuid.uuid4()).replace("-", "")),
             "namespaceowner": db_user,
             "nspacl": [
                 {
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_delete.py
index cfedec5..6cb2106 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_delete.py
@@ -29,7 +29,7 @@ class SchemaDeleteTestCase(BaseTestGenerator):
         self.database_info = parent_node_dict["database"][-1]
         self.db_name = self.database_info["db_name"]
         # Change the db name, so that schema will create in newly created db
-        self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:6]
+        self.schema_name = "schema_get_%s" % str(uuid.uuid4()).replace("-", "")
         connection = utils.get_db_connection(self.db_name,
                                              self.server['username'],
                                              self.server['db_password'],
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_put.py
index 33af1af..d6ad8f0 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/test_schema_put.py
@@ -29,7 +29,7 @@ class SchemaPutTestCase(BaseTestGenerator):
         self.database_info = parent_node_dict["database"][-1]
         self.db_name = self.database_info["db_name"]
         # Change the db name, so that schema will create in newly created db
-        self.schema_name = "schema_get_%s" % str(uuid.uuid4())[1:6]
+        self.schema_name = "schema_get_%s" % str(uuid.uuid4()).replace("-", "")
         connection = utils.get_db_connection(self.db_name,
                                              self.server['username'],
                                              self.server['db_password'],
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/utils.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/utils.py
index 2061406..fd5f43d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/tests/utils.py
@@ -23,7 +23,7 @@ def get_schema_config_data(db_user):
         "defseqacl": [],
         "deftblacl": [],
         "deftypeacl": [],
-        "name": "test_schema_{0}".format(str(uuid.uuid4())[1:8]),
+        "name": "test_schema_{0}".format(str(uuid.uuid4()).replace("-", "")),
         "namespaceowner": db_user,
         "nspacl": [
                       {
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_add.py
index a1d98d0..efffe9d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_add.py
@@ -45,7 +45,7 @@ class TypesAddTestCase(BaseTestGenerator):
     def runTest(self):
         """ This function will add type under schema node. """
         db_user = self.server["username"]
-        self.type_name = "test_type_add_%s" % (str(uuid.uuid4())[1:6])
+        self.type_name = "test_type_add_%s" % (str(uuid.uuid4()).replace("-", ""))
         data = {"name": self.type_name,
                 "is_sys_type": False,
                 "typtype": "c",
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_delete.py
index 8f18b8e..4e2c19d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_delete.py
@@ -41,7 +41,7 @@ class TypesDeleteTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to delete a type.")
-        self.type_name = "test_type_delete_%s" % (str(uuid.uuid4())[1:6])
+        self.type_name = "test_type_delete_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.type_id = types_utils.create_type(self.server, self.db_name,
                                                self.schema_name, self.type_name
                                                )
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_get.py
index 3fe57af..6066aca 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_get.py
@@ -41,7 +41,7 @@ class TypesGetTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to get a type.")
-        self.type_name = "test_type_get_%s" % (str(uuid.uuid4())[1:6])
+        self.type_name = "test_type_get_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.type_id = types_utils.create_type(self.server, self.db_name,
                                                self.schema_name, self.type_name
                                                )
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_put.py
index 6a7017b..0c5e04b 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/types/tests/test_types_put.py
@@ -42,7 +42,7 @@ class TypesUpdateTestCase(BaseTestGenerator):
                                                       self.schema_name)
         if not schema_response:
             raise Exception("Could not find the schema to update a type.")
-        self.type_name = "test_type_put_%s" % (str(uuid.uuid4())[1:6])
+        self.type_name = "test_type_put_%s" % (str(uuid.uuid4()).replace("-", ""))
         self.type_id = types_utils.create_type(self.server, self.db_name,
                                                self.schema_name, self.type_name
                                                )
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_add.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_add.py
index 1cc23fa..ee16927 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_add.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_add.py
@@ -21,7 +21,7 @@ from regression.python_test_utils import test_utils as utils
 
 class ViewsAddTestCase(BaseTestGenerator):
     """This class will add new view under schema node."""
-    view_name = "test_view_add_%s" % (str(uuid.uuid4())[1:6])
+    view_name = "test_view_add_%s" % (str(uuid.uuid4()).replace("-", ""))
     v_data = {"schema": "",
               "owner": "",
               "datacl": [],
@@ -29,7 +29,7 @@ class ViewsAddTestCase(BaseTestGenerator):
               "name": view_name,
               "definition": "SELECT 'Hello World';"
               }
-    m_view_name = "test_mview_add_%s" % (str(uuid.uuid4())[1:6])
+    m_view_name = "test_mview_add_%s" % (str(uuid.uuid4()).replace("-", ""))
     m_view_data = {"spcname": "pg_default",
                    "toast_autovacuum_enabled": False,
                    "autovacuum_enabled": False,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_delete.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_delete.py
index 4a41e58..da3a169 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_delete.py
@@ -31,11 +31,11 @@ class ViewsDeleteTestCase(BaseTestGenerator):
         ('Delete view under schema node', dict(url='/browser/view/obj/',
                                                view_name=
                                                "test_view_delete_%s" %
-                                               (str(uuid.uuid4())[1:6]),
+                                               (str(uuid.uuid4()).replace("-", "")),
                                                sql_query=view_sql)),
         ('Delete materialized view under schema node',
          dict(url='/browser/mview/obj/',
-              view_name="test_mview_delete_%s" % (str(uuid.uuid4())[1:6]),
+              view_name="test_mview_delete_%s" % (str(uuid.uuid4()).replace("-", "")),
               sql_query=m_view_sql))
     ]
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_get.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_get.py
index 9d2cace..d9faf32 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_get.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_get.py
@@ -31,11 +31,11 @@ class ViewsGetTestCase(BaseTestGenerator):
         ('Get view under schema node', dict(url='/browser/view/obj/',
                                             view_name=
                                             "test_view_get_%s" %
-                                            (str(uuid.uuid4())[1:6]),
+                                            (str(uuid.uuid4()).replace("-", "")),
                                             sql_query=view_sql)),
         ('Get materialized view under schema node',
          dict(url='/browser/mview/obj/',
-              view_name="test_mview_get_%s" % (str(uuid.uuid4())[1:6]),
+              view_name="test_mview_get_%s" % (str(uuid.uuid4()).replace("-", "")),
               sql_query=m_view_sql))
     ]
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_put.py b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_put.py
index 05c1851..a6e6e31 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/views/tests/test_views_put.py
@@ -32,11 +32,11 @@ class ViewsUpdateTestCase(BaseTestGenerator):
         ('Update view under schema node', dict(url='/browser/view/obj/',
                                                view_name=
                                                "test_view_put_%s" %
-                                               (str(uuid.uuid4())[1:6]),
+                                               (str(uuid.uuid4()).replace("-", "")),
                                                sql_query=view_sql)),
         ('Update materialized view under schema node',
          dict(url='/browser/mview/obj/',
-              view_name="test_mview_put_%s" % (str(uuid.uuid4())[1:6]),
+              view_name="test_mview_put_%s" % (str(uuid.uuid4()).replace("-", "")),
               sql_query=m_view_sql))
     ]
 
diff --git a/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_delete.py b/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_delete.py
index 4fe684c..7dfcb48 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_delete.py
@@ -23,7 +23,7 @@ class DatabaseDeleteTestCase(BaseTestGenerator):
     ]
 
     def setUp(self):
-        self.db_name = "db_delete_%s" % str(uuid.uuid4())[1:4],
+        self.db_name = "db_delete_%s" % str(uuid.uuid4()).replace("-", ""),
         self.db_id = utils.create_database(self.server, self.db_name)
         self.server_id = parent_node_dict["server"][-1]["server_id"]
         db_dict = {"server_id": self.server_id, "db_id": self.db_id,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_put.py b/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_put.py
index 6bd36e6..be89c4d 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_put.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/tests/test_db_put.py
@@ -24,7 +24,7 @@ class DatabasesUpdateTestCase(BaseTestGenerator):
     ]
 
     def setUp(self):
-        self.db_name = "test_db_put_%s" % str(uuid.uuid4())[1:8]
+        self.db_name = "test_db_put_%s" % str(uuid.uuid4()).replace("-", "")
         self.db_id = utils.create_database(self.server, self.db_name)
         self.server_id = parent_node_dict["server"][-1]["server_id"]
         db_dict = {"server_id": self.server_id, "db_id": self.db_id,
diff --git a/web/pgadmin/browser/server_groups/servers/databases/tests/utils.py b/web/pgadmin/browser/server_groups/servers/databases/tests/utils.py
index 05ced56..2bd92aa 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/tests/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/databases/tests/utils.py
@@ -91,7 +91,7 @@ def get_db_data(db_owner):
       }
     ],
         "encoding": "UTF8",
-        "name": "db_add_%s" % str(uuid.uuid4())[1:6],
+        "name": "db_add_%s" % str(uuid.uuid4()).replace("-", ""),
         "privileges": [],
         "securities": [],
         "variables": []
diff --git a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_add.py b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_add.py
index 740f2cf..7fc91a3 100644
--- a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_add.py
+++ b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_add.py
@@ -42,7 +42,7 @@ class ResourceGroupsAddTestCase(BaseTestGenerator):
     def runTest(self):
         """This function will add resource groups under server node"""
         self.resource_group = "test_resource_group_add%s" % \
-                              str(uuid.uuid4())[1:6]
+                              str(uuid.uuid4()).replace("-", "")
         data = {"name": self.resource_group,
                 "cpu_rate_limit": 0,
                 "dirty_rate_limit": 0}
diff --git a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_delete.py b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_delete.py
index 19fea8c..16aa222 100644
--- a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_delete.py
@@ -38,7 +38,7 @@ class ResourceGroupsDeleteTestCase(BaseTestGenerator):
                               "and below."
                     self.skipTest(message)
         self.resource_group = "test_resource_group_delete%s" % \
-                              str(uuid.uuid4())[1:6]
+                              str(uuid.uuid4()).replace("-", "")
         self.resource_group_id = resource_groups_utils.create_resource_groups(
             self.server, self.resource_group)
 
diff --git a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_put.py b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_put.py
index 3a97b55..9faec83 100644
--- a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_put.py
+++ b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/test_resource_groups_put.py
@@ -39,7 +39,7 @@ class ResourceGroupsPutTestCase(BaseTestGenerator):
                               " and below."
                     self.skipTest(message)
         self.resource_group_name = "test_resource_group_put%s" % \
-                                   str(uuid.uuid4())[1:6]
+                                   str(uuid.uuid4()).replace("-", "")
         self.resource_group_id = resource_groups_utils.create_resource_groups(
             self.server, self.resource_group_name)
 
@@ -50,7 +50,7 @@ class ResourceGroupsPutTestCase(BaseTestGenerator):
         if not resource_grp_response:
             raise Exception("Could not find the resource group to fetch.")
         self.resource_group_name = "test_resource_group_put%s" % \
-                                   str(uuid.uuid4())[1:6]
+                                   str(uuid.uuid4()).replace("-", "")
         data = {"id": self.resource_group_id,
                 "name": self.resource_group_name}
         response = self.tester.put('{0}{1}/{2}/{3}'.format(
diff --git a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/tests_resource_groups_get.py b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/tests_resource_groups_get.py
index 57e7879..776ce4f 100644
--- a/web/pgadmin/browser/server_groups/servers/resource_groups/tests/tests_resource_groups_get.py
+++ b/web/pgadmin/browser/server_groups/servers/resource_groups/tests/tests_resource_groups_get.py
@@ -38,7 +38,7 @@ class ResourceGroupsGetTestCase(BaseTestGenerator):
                               " and below."
                     self.skipTest(message)
         self.resource_group = "test_resource_group_get%s" % \
-                         str(uuid.uuid4())[1:6]
+                         str(uuid.uuid4()).replace("-", "")
         self.resource_group_id = resource_groups_utils.create_resource_groups(
             self.server, self.resource_group)
 
diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_delete.py b/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_delete.py
index adbb4e6..54a1b89 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_delete.py
@@ -23,7 +23,7 @@ class LoginRoleDeleteTestCase(BaseTestGenerator):
     ]
 
     def setUp(self):
-        self.role_name = "role_delete_%s" % str(uuid.uuid4())[1:6]
+        self.role_name = "role_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.role_id = roles_utils.create_role(self.server, self.role_name)
         self.server_id = parent_node_dict["server"][-1]["server_id"]
         role_dict = {"server_id": self.server_id, "role_id": self.role_id,
diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_get.py b/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_get.py
index eddd499..44841c8 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_get.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_get.py
@@ -24,7 +24,7 @@ class LoginRoleGetTestCase(BaseTestGenerator):
 
     def setUp(self):
         self.server_id = parent_node_dict["server"][-1]["server_id"]
-        self.role_name = "role_get_%s" % str(uuid.uuid4())[1:6]
+        self.role_name = "role_get_%s" % str(uuid.uuid4()).replace("-", "")
         self.role_id = roles_utils.create_role(self.server, self.role_name)
         role_dict = {"server_id": self.server_id, "role_id": self.role_id,
                      "role_name": self.role_name}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_put.py b/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_put.py
index a5ed81c..31cff57 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_put.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/tests/test_role_put.py
@@ -25,7 +25,7 @@ class LoginRolePutTestCase(BaseTestGenerator):
 
     def setUp(self):
         self.server_id = parent_node_dict["server"][-1]["server_id"]
-        self.role_name = "role_put_%s" % str(uuid.uuid4())[1:6]
+        self.role_name = "role_put_%s" % str(uuid.uuid4()).replace("-", "")
         self.role_id = roles_utils.create_role(self.server, self.role_name)
         role_dict = {"server_id": self.server_id, "role_id": self.role_id,
                      "role_name": self.role_name}
diff --git a/web/pgadmin/browser/server_groups/servers/roles/tests/utils.py b/web/pgadmin/browser/server_groups/servers/roles/tests/utils.py
index 74b21f5..88ca787 100644
--- a/web/pgadmin/browser/server_groups/servers/roles/tests/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/roles/tests/utils.py
@@ -78,7 +78,7 @@ def get_role_data(lr_pwd):
         "rolcreaterole": "true",
         "rolinherit": "true",
         "rolmembership": [],
-        "rolname": "test_role_%s" % str(uuid.uuid4())[1:6],
+        "rolname": "test_role_%s" % str(uuid.uuid4()).replace("-", ""),
         "rolpassword": lr_pwd,
         "rolvaliduntil": "12/27/2017",
         "seclabels": [],
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_delete.py b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_delete.py
index 615d298..6c76945 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_delete.py
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_delete.py
@@ -32,7 +32,7 @@ class TableSpaceDeleteTestCase(BaseTestGenerator):
                       " not configured for server: %s" % self.server['name']
             # Skip the test case if tablespace_path not found.
             self.skipTest(message)
-        self.tablespace_name = "tablespace_delete_%s" % str(uuid.uuid4())[1:6]
+        self.tablespace_name = "tablespace_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.server_id = parent_node_dict["server"][-1]["server_id"]
         self.tablespace_id = tablespace_utils.create_tablespace(
             self.server, self.tablespace_name)
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_get.py b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_get.py
index ca322d3..5e57cfa 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_get.py
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_get.py
@@ -31,7 +31,7 @@ class TablespaceGetTestCase(BaseTestGenerator):
                       " not configured for server: %s" % self.server['name']
             # Skip the test case if tablespace_path not found.
             self.skipTest(message)
-        self.tablespace_name = "tablespace_delete_%s" % str(uuid.uuid4())[1:6]
+        self.tablespace_name = "tablespace_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.tablespace_id = tablespace_utils.create_tablespace(
             self.server, self.tablespace_name)
         self.server_id = parent_node_dict["server"][-1]["server_id"]
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_put.py b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_put.py
index 31ea6ab..2decad2 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_put.py
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/test_tbspc_put.py
@@ -31,7 +31,7 @@ class TableSpaceUpdateTestCase(BaseTestGenerator):
                       " not configured for server: %s" % self.server['name']
             # Skip the test case if tablespace_path not found.
             self.skipTest(message)
-        self.tablespace_name = "tablespace_delete_%s" % str(uuid.uuid4())[1:6]
+        self.tablespace_name = "tablespace_delete_%s" % str(uuid.uuid4()).replace("-", "")
         self.tablespace_id = tablespace_utils.create_tablespace(
             self.server, self.tablespace_name)
         self.server_id = parent_node_dict["server"][-1]["server_id"]
diff --git a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py
index eb16beb..a282591 100644
--- a/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py
+++ b/web/pgadmin/browser/server_groups/servers/tablespaces/tests/utils.py
@@ -22,7 +22,7 @@ file_name = os.path.basename(__file__)
 def get_tablespace_data(tablespace_path, db_owner):
     """This function returns the tablespace data"""
     data = {
-        "name": "test_%s" % str(uuid.uuid4())[1:8],
+        "name": "test_%s" % str(uuid.uuid4()).replace("-", ""),
         "seclabels": [],
         "spcacl": [
             {
diff --git a/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py b/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py
index eff6fef..cffefe6 100644
--- a/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py
+++ b/web/pgadmin/browser/server_groups/servers/tests/test_role_dependencies_sql.py
@@ -6,14 +6,14 @@
 # This software is released under the PostgreSQL Licence
 #
 ##########################################################################
-from pgadmin.browser.server_groups.servers.roles.tests.utils import create_role, delete_role
-from pgadmin.utils.route import BaseTestGenerator
 import os
+import uuid
 
+from pgadmin.utils.route import BaseTestGenerator
 from regression.python_test_utils import test_utils
-from regression.python_test_utils.sql_template_test_base import SQLTemplateTestBase
 from regression.python_test_utils.template_helper import file_as_template
-from regression.python_test_utils.test_utils import create_database
+from regression import parent_node_dict
+from regression.python_test_utils import test_utils as utils
 
 
 class TestRoleDependenciesSql(BaseTestGenerator):
@@ -30,22 +30,29 @@ class TestRoleDependenciesSql(BaseTestGenerator):
         with test_utils.Database(self.server) as (connection, database_name):
             cursor = connection.cursor()
             try:
+                self.role_name = "test_role_%s" % str(uuid.uuid4()).replace(
+                    "-", "")
                 cursor.execute(
-                    "CREATE ROLE testpgadmin LOGIN PASSWORD '%s'"
-                    % self.server['db_password'])
+                    "CREATE ROLE %s LOGIN PASSWORD '%s'"
+                    % (self.role_name, self.server['db_password']))
+                self.server_id = parent_node_dict["server"][-1]["server_id"]
+                role_dict = {"server_id": self.server_id,
+                             "role_name": self.role_name}
+                utils.write_node_info("lrid", role_dict)
             except Exception as exception:
                 print(exception)
             connection.commit()
 
         self.server_with_modified_user = self.server.copy()
-        self.server_with_modified_user['username'] = "testpgadmin"
+        self.server_with_modified_user['username'] = self.role_name
 
     def runTest(self):
         if hasattr(self, "ignore_test"):
             return
 
         with test_utils.Database(self.server) as (connection, database_name):
-            test_utils.create_table(self.server_with_modified_user, database_name, "test_new_role_table")
+            test_utils.create_table(self.server_with_modified_user,
+                                    database_name, "test_new_role_table")
             cursor = connection.cursor()
             cursor.execute("SELECT pg_class.oid AS table_id "
                            "FROM pg_class "
@@ -61,13 +68,15 @@ class TestRoleDependenciesSql(BaseTestGenerator):
     def tearDown(self):
         with test_utils.Database(self.server) as (connection, database_name):
             cursor = connection.cursor()
-            cursor.execute("DROP ROLE testpgadmin")
+            cursor.execute("DROP ROLE %s" % self.role_name)
             connection.commit()
 
     def generate_sql(self, version):
-        template_file = self.get_template_file(version, "role_dependencies.sql")
+        template_file = self.get_template_file(version,
+                                               "role_dependencies.sql")
         template = file_as_template(template_file)
-        sql = template.render(where_clause="WHERE dep.objid=%s::oid" % self.table_id)
+        sql = template.render(
+            where_clause="WHERE dep.objid=%s::oid" % self.table_id)
 
         return sql
 
@@ -82,4 +91,5 @@ class TestRoleDependenciesSql(BaseTestGenerator):
 
     @staticmethod
     def get_template_file(version, filename):
-        return os.path.join(os.path.dirname(__file__), "..", "templates", "depends", "sql", version, filename)
+        return os.path.join(os.path.dirname(__file__), "..", "templates",
+                            "depends", "sql", version, filename)
