diff options
| author | Ramana Juvvadi <rjuvvadi@hcl.com> | 2011-05-12 09:02:59 -0500 |
|---|---|---|
| committer | Ramana Juvvadi <rjuvvadi@hcl.com> | 2011-05-12 09:02:59 -0500 |
| commit | 8ceb100d94bea60db77d32bd1e09d6f8fb951ed3 (patch) | |
| tree | 0ec53b46b6c80902b0a806a3e6153e32be53a880 | |
| parent | efaab7304b36ca4dab9ca08e2df7d2ffd75d5d3b (diff) | |
| parent | 1b4fc952f27a292a3f164e42b17d81b1be8bb596 (diff) | |
| download | keystone-8ceb100d94bea60db77d32bd1e09d6f8fb951ed3.tar.gz keystone-8ceb100d94bea60db77d32bd1e09d6f8fb951ed3.tar.xz keystone-8ceb100d94bea60db77d32bd1e09d6f8fb951ed3.zip | |
Merge branch 'master' of https://git.hcleai.com/keystone
| -rw-r--r-- | keystone/file | 242 | ||||
| -rw-r--r-- | setup.py | 2 | ||||
| -rw-r--r-- | test/unit/test_authentication.py | 6 | ||||
| -rw-r--r-- | test/unit/test_groups.py | 4 | ||||
| -rw-r--r-- | test/unit/test_keystone.py | 10 | ||||
| -rw-r--r-- | test/unit/test_tenant_groups.py | 4 | ||||
| -rw-r--r-- | test/unit/test_tenants.py | 4 | ||||
| -rw-r--r-- | test/unit/test_token.py | 1 | ||||
| -rw-r--r-- | test/unit/test_users.py | 4 | ||||
| -rw-r--r-- | test/unit/test_version.py | 1 |
10 files changed, 9 insertions, 269 deletions
diff --git a/keystone/file b/keystone/file deleted file mode 100644 index b2175cbd..00000000 --- a/keystone/file +++ /dev/null @@ -1,242 +0,0 @@ -************* Module server -E: 67: No name 'template' in module 'keystone.common' -F: 67: Unable to import 'keystone.common.template' -C: 69: Invalid name "logger" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$) -C: 74: Invalid name "service" (should match (([A-Z_][A-Z0-9_]*)|(__.*__))$) -W: 78: String statement has no effect -C: 81:is_xml_response: Missing docstring -C: 87:get_app_root: Missing docstring -C: 91:get_auth_token: Missing docstring -C: 98:wrap_error: Missing docstring -C:101:wrap_error.check_error: Missing docstring -W:104:wrap_error.check_error: Catch "Exception" -C:126:send_error: Missing docstring -C:150:send_result: Missing docstring -W:179:StaticFilesController.__init__: __init__ method from base class 'Controller' is not called -C:183:StaticFilesController.get_pdf_contract: Missing docstring -R:183:StaticFilesController.get_pdf_contract: Method could be a function -C:190:StaticFilesController.get_wadl_contract: Missing docstring -R:190:StaticFilesController.get_wadl_contract: Method could be a function -C:197:StaticFilesController.get_xsd_contract: Missing docstring -R:197:StaticFilesController.get_xsd_contract: Method could be a function -C:204:StaticFilesController.get_xsd_atom_contract: Missing docstring -R:204:StaticFilesController.get_xsd_atom_contract: Method could be a function -W:217:VersionController.__init__: __init__ method from base class 'Controller' is not called -C:221:VersionController.get_version_info: Missing docstring -R:221:VersionController.get_version_info: Method could be a function -W:249:AuthController.__init__: __init__ method from base class 'Controller' is not called -C:254:AuthController.authenticate: Missing docstring -C:261:AuthController.validate_token: Missing docstring -R:261:AuthController.validate_token: Method could be a function -C:272:AuthController.delete_token: Missing docstring -R:272:AuthController.delete_token: Method could be a function -W:283:TenantController.__init__: __init__ method from base class 'Controller' is not called -C:287:TenantController.create_tenant: Missing docstring -R:287:TenantController.create_tenant: Method could be a function -W:308:TenantController.get_tenants: Redefining name 'tenants' from outer scope (line 63) -C:293:TenantController.get_tenants: Missing docstring -R:293:TenantController.get_tenants: Method could be a function -C:312:TenantController.get_tenant: Missing docstring -R:312:TenantController.get_tenant: Method could be a function -C:317:TenantController.update_tenant: Missing docstring -R:317:TenantController.update_tenant: Method could be a function -C:323:TenantController.delete_tenant: Missing docstring -R:323:TenantController.delete_tenant: Method could be a function -C:328:TenantController.create_tenant_group: Missing docstring -R:328:TenantController.create_tenant_group: Method could be a function -C:335:TenantController.get_tenant_groups: Missing docstring -R:335:TenantController.get_tenant_groups: Method could be a function -C:355:TenantController.get_tenant_group: Missing docstring -R:355:TenantController.get_tenant_group: Method could be a function -C:361:TenantController.update_tenant_group: Missing docstring -R:361:TenantController.update_tenant_group: Method could be a function -C:368:TenantController.delete_tenant_group: Missing docstring -R:368:TenantController.delete_tenant_group: Method could be a function -W:389:TenantController.get_users_tenant_group: Redefining name 'users' from outer scope (line 66) -C:374:TenantController.get_users_tenant_group: Missing docstring -E:377:TenantController.get_users_tenant_group: Undefined variable 'request' -R:374:TenantController.get_users_tenant_group: Method could be a function -C:394:TenantController.add_user_tenant_group: Missing docstring -R:394:TenantController.add_user_tenant_group: Method could be a function -C:400:TenantController.delete_user_tenant_group: Missing docstring -R:400:TenantController.delete_user_tenant_group: Method could be a function -W:412:UserController.__init__: __init__ method from base class 'Controller' is not called -C:416:UserController.create_user: Missing docstring -R:416:UserController.create_user: Method could be a function -W:435:UserController.get_tenant_users: Redefining name 'users' from outer scope (line 66) -C:423:UserController.get_tenant_users: Missing docstring -R:423:UserController.get_tenant_users: Method could be a function -C:440:UserController.get_user_groups: Missing docstring -R:440:UserController.get_user_groups: Method could be a function -C:459:UserController.get_user: Missing docstring -R:459:UserController.get_user: Method could be a function -C:464:UserController.update_user: Missing docstring -R:464:UserController.update_user: Method could be a function -C:471:UserController.delete_user: Missing docstring -R:471:UserController.delete_user: Method could be a function -C:476:UserController.set_user_password: Missing docstring -R:476:UserController.set_user_password: Method could be a function -C:483:UserController.set_user_enabled: Missing docstring -R:483:UserController.set_user_enabled: Method could be a function -W:496:GroupsController.__init__: __init__ method from base class 'Controller' is not called -C:500:GroupsController.create_group: Missing docstring -E:501:GroupsController.create_group: Module 'keystone.logic.types.tenant' has no 'GlobalGroup' member -R:500:GroupsController.create_group: Method could be a function -C:507:GroupsController.get_groups: Missing docstring -R:507:GroupsController.get_groups: Method could be a function -C:527:GroupsController.get_group: Missing docstring -R:527:GroupsController.get_group: Method could be a function -C:532:GroupsController.update_group: Missing docstring -E:533:GroupsController.update_group: Module 'keystone.logic.types.tenant' has no 'GlobalGroup' member -R:532:GroupsController.update_group: Method could be a function -C:539:GroupsController.delete_group: Missing docstring -R:539:GroupsController.delete_group: Method could be a function -W:560:GroupsController.get_users_global_group: Redefining name 'users' from outer scope (line 66) -C:544:GroupsController.get_users_global_group: Missing docstring -R:544:GroupsController.get_users_global_group: Method could be a function -C:565:GroupsController.add_user_global_group: Missing docstring -R:565:GroupsController.add_user_global_group: Method could be a function -C:571:GroupsController.delete_user_global_group: Missing docstring -R:571:GroupsController.delete_user_global_group: Method could be a function -W:746:app_factory: Catch "Exception" -W: 60: Unused import exthandler -W: 49: Unused import HTTPBadRequest -W: 49: Unused import HTTPConflict -W: 43: Unused import json -W: 48: Unused import descriptors -W: 47: Unused import Request -W: 49: Unused import HTTPNotFound -W: 42: Unused import httplib - - -Report -====== -334 statements analysed. - -Raw metrics ------------ - -+----------+-------+------+---------+-----------+ -|type |number |% |previous |difference | -+==========+=======+======+=========+===========+ -|code |529 |81.38 |529 |= | -+----------+-------+------+---------+-----------+ -|docstring |63 |9.69 |63 |= | -+----------+-------+------+---------+-----------+ -|comment |23 |3.54 |23 |= | -+----------+-------+------+---------+-----------+ -|empty |35 |5.38 |35 |= | -+----------+-------+------+---------+-----------+ - - - -Duplication ------------ - -+-------------------------+------+---------+-----------+ -| |now |previous |difference | -+=========================+======+=========+===========+ -|nb duplicated lines |0 |0 |= | -+-------------------------+------+---------+-----------+ -|percent duplicated lines |0.000 |0.000 |= | -+-------------------------+------+---------+-----------+ - - - -External dependencies ---------------------- -:: - - keystone - \-common - | \-wsgi (server) - \-logic - \-service (server) - \-types - \-auth (server) - \-fault (server) - \-tenant (server) - \-user (server) - routes (server) - webob - \-Request (server) - \-Response (server) - \-descriptors (server) - \-exc - \-HTTPBadRequest (server) - \-HTTPConflict (server) - \-HTTPNotFound (server) - - - -Statistics by type ------------------- - -+---------+-------+-----------+-----------+------------+---------+ -|type |number |old number |difference |%documented |%badname | -+=========+=======+===========+===========+============+=========+ -|module |1 |1 |= |100.00 |0.00 | -+---------+-------+-----------+-----------+------------+---------+ -|class |7 |7 |= |100.00 |0.00 | -+---------+-------+-----------+-----------+------------+---------+ -|method |44 |44 |= |15.91 |0.00 | -+---------+-------+-----------+-----------+------------+---------+ -|function |9 |9 |= |22.22 |0.00 | -+---------+-------+-----------+-----------+------------+---------+ - - - -Messages by category --------------------- - -+-----------+-------+---------+-----------+ -|type |number |previous |difference | -+===========+=======+=========+===========+ -|convention |46 |46 |= | -+-----------+-------+---------+-----------+ -|refactor |36 |36 |= | -+-----------+-------+---------+-----------+ -|warning |21 |21 |= | -+-----------+-------+---------+-----------+ -|error |4 |4 |= | -+-----------+-------+---------+-----------+ - - - -Messages --------- - -+-----------+------------+ -|message id |occurrences | -+===========+============+ -|C0111 |44 | -+-----------+------------+ -|R0201 |36 | -+-----------+------------+ -|W0611 |8 | -+-----------+------------+ -|W0231 |6 | -+-----------+------------+ -|W0621 |4 | -+-----------+------------+ -|W0703 |2 | -+-----------+------------+ -|E1101 |2 | -+-----------+------------+ -|C0103 |2 | -+-----------+------------+ -|W0105 |1 | -+-----------+------------+ -|F0401 |1 | -+-----------+------------+ -|E0611 |1 | -+-----------+------------+ -|E0602 |1 | -+-----------+------------+ - - - -Global evaluation ------------------ -Your code has been rated at 6.32/10 (previous run: 6.32/10) - @@ -16,7 +16,7 @@ from setuptools import setup, find_packages -version = '1.0' +version = '1.0' setup( name='keystone', diff --git a/test/unit/test_authentication.py b/test/unit/test_authentication.py index 209c403e..78bf0486 100644 --- a/test/unit/test_authentication.py +++ b/test/unit/test_authentication.py @@ -33,7 +33,7 @@ class authentication_test(unittest.TestCase): def test_a_authorize_xml(self): resp, content = utils.get_token_xml('joeuser', 'secrete', '', - self.tenant) + self.tenant) self.assertEqual(200, int(resp['status'])) self.assertEqual('application/xml', utils.content_type(resp)) @@ -105,9 +105,5 @@ class authentication_test(unittest.TestCase): self.assertEqual(400, int(resp['status'])) self.assertEqual('application/xml', utils.content_type(resp)) - -def run(): - unittest.main() - if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_groups.py b/test/unit/test_groups.py index 5696c803..1ca4dff3 100644 --- a/test/unit/test_groups.py +++ b/test/unit/test_groups.py @@ -995,9 +995,5 @@ class delete_users_global_group_test(unittest.TestCase): self.fail('Service Not Available') self.assertEqual(404, int(respG['status'])) - -def run(): - unittest.main() - if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_keystone.py b/test/unit/test_keystone.py index 0301bf82..9a6fe4df 100644 --- a/test/unit/test_keystone.py +++ b/test/unit/test_keystone.py @@ -3,7 +3,9 @@ import os import unittest from lxml import etree MODULE_EXTENSIONS = set('.py'.split()) - +TEST_FILES = ['test_authentication.py', 'test_keystone.py', 'test_tenants.py', + 'test_common.py', 'test_users.py','test_tenant_groups.py', + 'test_token.py', 'test_version.py', 'test_groups.py'] def unit_test_extractor(tup, path, filenames): """Pull ``unittest.TestSuite``s from modules in path @@ -24,9 +26,11 @@ def unit_test_extractor(tup, path, filenames): logging.info('Base: %s', '.'.join(relpath_pieces)) for filename in filenames: - base, ext = os.path.splitext(filename) - if ext not in MODULE_EXTENSIONS: # Not a Python module. + if filename not in TEST_FILES: continue + base, ext = os.path.splitext(filename) + #if ext not in MODULE_EXTENSIONS : # Not a Python module. + # continue logging.info('Module: %s', base) module_name = '.'.join(relpath_pieces + [base]) logging.info('Importing from %s', module_name) diff --git a/test/unit/test_tenant_groups.py b/test/unit/test_tenant_groups.py index 5b6ed725..9c46db42 100644 --- a/test/unit/test_tenant_groups.py +++ b/test/unit/test_tenant_groups.py @@ -1191,9 +1191,5 @@ class delete_users_tenant_group_test(tenant_group_test): self.fail('Service Not Available') self.assertEqual(404, int(resp['status'])) - -def run(): - unittest.main() - if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_tenants.py b/test/unit/test_tenants.py index c91e9395..0489c195 100644 --- a/test/unit/test_tenants.py +++ b/test/unit/test_tenants.py @@ -633,9 +633,5 @@ class delete_tenant_test(tenant_test): str(self.auth_token)) self.assertEqual(204, int(resp['status'])) - -def run(): - unittest.main() - if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_token.py b/test/unit/test_token.py index bc61c5ad..ce33c8f1 100644 --- a/test/unit/test_token.py +++ b/test/unit/test_token.py @@ -109,6 +109,5 @@ class validate_token(unittest.TestCase): self.assertEqual(401, int(resp['status'])) self.assertEqual('application/json', utils.content_type(resp)) - if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_users.py b/test/unit/test_users.py index 2825ce7c..069b4055 100644 --- a/test/unit/test_users.py +++ b/test/unit/test_users.py @@ -1637,9 +1637,5 @@ class set_enabled_test(user_test): self.assertEqual(401, resp_val) self.assertEqual('application/xml', content_type(resp)) - -def run(): - unittest.main() - if __name__ == '__main__': unittest.main() diff --git a/test/unit/test_version.py b/test/unit/test_version.py index 407c11ef..76b013ab 100644 --- a/test/unit/test_version.py +++ b/test/unit/test_version.py @@ -28,6 +28,5 @@ class version_test(unittest.TestCase): self.assertEqual(200, int(resp['status'])) self.assertEqual('application/xml', utils.content_type(resp)) - if __name__ == '__main__': unittest.main() |
