mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Initial version of a regression test framework
This commit is contained in:
committed by
Dave Page
parent
ffa348fe5d
commit
98d473a7ec
15
web/pgadmin/browser/server_groups/tests/__init__.py
Normal file
15
web/pgadmin/browser/server_groups/tests/__init__.py
Normal file
@@ -0,0 +1,15 @@
|
||||
# #################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
# ##################################################################
|
||||
|
||||
from pgadmin.utils.route import BaseTestGenerator
|
||||
|
||||
|
||||
class SGGenerateTestCase(BaseTestGenerator):
|
||||
def runTest(self):
|
||||
print ("In SGGenerateTestCase...")
|
||||
36
web/pgadmin/browser/server_groups/tests/test_sg_add.py
Normal file
36
web/pgadmin/browser/server_groups/tests/test_sg_add.py
Normal file
@@ -0,0 +1,36 @@
|
||||
###########################################################################
|
||||
#
|
||||
# pgAdmin 4 - PostgreSQL Tools
|
||||
#
|
||||
# Copyright (C) 2013 - 2016, The pgAdmin Development Team
|
||||
# This software is released under the PostgreSQL Licence
|
||||
#
|
||||
###########################################################################
|
||||
|
||||
import json
|
||||
|
||||
from pgadmin.browser.tests.test_login import LoginTestCase
|
||||
from regression.config import config_data
|
||||
|
||||
|
||||
class SgNodeTestCase(LoginTestCase):
|
||||
"""
|
||||
This class will check available server groups in pgAdmin.
|
||||
"""
|
||||
|
||||
priority = 1
|
||||
|
||||
scenarios = [
|
||||
# Fetching the default url for server group node
|
||||
('Check Server Group Node', dict(url='/browser/server-group/obj/'))
|
||||
]
|
||||
|
||||
def runTest(self):
|
||||
"""This function will check available server groups."""
|
||||
|
||||
i = config_data['test_server_group']
|
||||
|
||||
response = self.tester.get(self.url + str(i), content_type='html/json')
|
||||
self.assertTrue(response.status_code, 200)
|
||||
respdata = json.loads(response.data)
|
||||
self.assertTrue(respdata['id'], i)
|
||||
Reference in New Issue
Block a user