mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-30 10:47:05 -06:00
Fix tablespace tests for Python 3.x. Fixes #3138
This commit is contained in:
parent
f8771d5585
commit
51cc04b5b0
@ -6,8 +6,12 @@
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
##########################################################################
|
||||
import sys
|
||||
|
||||
from mock import MagicMock
|
||||
if sys.version_info < (3, 3):
|
||||
from mock import MagicMock
|
||||
else:
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
from pgadmin.browser.server_groups.servers.tablespaces import TablespaceModule
|
||||
from pgadmin.utils.route import BaseTestGenerator
|
||||
@ -43,4 +47,6 @@ class BackendSupportedTestCase(BaseTestGenerator):
|
||||
manager = MagicMock()
|
||||
manager.sversion = self.manager['sversion']
|
||||
manager.server_type = self.manager['server_type']
|
||||
self.assertEquals(self.expected_result, module.BackendSupported(manager))
|
||||
self.assertEquals(
|
||||
self.expected_result, module.BackendSupported(manager)
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user