mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-30 10:47:05 -06:00
PEP8 fixes.
This commit is contained in:
parent
5ebd9ee8d3
commit
fa9aebadbd
@ -9,8 +9,12 @@
|
||||
import os
|
||||
|
||||
|
||||
def compile_template_name(template_prefix, template_file_name, server_type, version):
|
||||
return os.path.join(compile_template_path(template_prefix, server_type, version), template_file_name)
|
||||
def compile_template_name(
|
||||
template_prefix, template_file_name, server_type, version):
|
||||
return os.path.join(
|
||||
compile_template_path(template_prefix, server_type, version),
|
||||
template_file_name
|
||||
)
|
||||
|
||||
|
||||
def compile_template_path(template_prefix, server_type, version):
|
||||
|
@ -12,23 +12,32 @@ from pgadmin.utils.route import BaseTestGenerator
|
||||
|
||||
class StartRunningQueryTest(BaseTestGenerator):
|
||||
"""
|
||||
Check that the apply_explain_plan_weapper_if_needed method works as intended
|
||||
Check that the apply_explain_plan_weapper_if_needed method works as
|
||||
intended
|
||||
"""
|
||||
scenarios = [
|
||||
('When server is Postgres and version is 10, it returns the path to the postgres template', dict(
|
||||
server_type='pg',
|
||||
version=100000,
|
||||
|
||||
expected_return_value='some/prefix/#100000#/some_file.sql'
|
||||
)),
|
||||
('When server is GreenPlum and version is 5, it returns the path to the GreenPlum template', dict(
|
||||
server_type='gpdb',
|
||||
version=80323,
|
||||
|
||||
expected_return_value='some/prefix/#gpdb#80323#/some_file.sql'
|
||||
)),
|
||||
(
|
||||
'When server is Postgres and version is 10, it returns the path '
|
||||
'to the postgres template',
|
||||
dict(
|
||||
server_type='pg',
|
||||
version=100000,
|
||||
expected_return_value='some/prefix/#100000#/some_file.sql'
|
||||
)
|
||||
),
|
||||
(
|
||||
'When server is GreenPlum and version is 5, it returns the path '
|
||||
'to the GreenPlum template',
|
||||
dict(
|
||||
server_type='gpdb',
|
||||
version=80323,
|
||||
expected_return_value='some/prefix/#gpdb#80323#/some_file.sql'
|
||||
)
|
||||
),
|
||||
]
|
||||
|
||||
def runTest(self):
|
||||
result = compile_template_name('some/prefix', 'some_file.sql', self.server_type, self.version)
|
||||
result = compile_template_name(
|
||||
'some/prefix', 'some_file.sql', self.server_type, self.version
|
||||
)
|
||||
self.assertEquals(result, self.expected_return_value)
|
||||
|
Loading…
Reference in New Issue
Block a user