Change in vdsm[master]: api: Convert schemaTests to use vdsmapi.get_api
agl at us.ibm.com
agl at us.ibm.com
Fri Feb 15 19:15:45 UTC 2013
Adam Litke has uploaded a new change for review.
Change subject: api: Convert schemaTests to use vdsmapi.get_api
......................................................................
api: Convert schemaTests to use vdsmapi.get_api
Change-Id: I3e5716fcb9724621f4fb282746bf02958b1972d4
Signed-off-by: Adam Litke <agl at us.ibm.com>
---
M tests/schemaTests.py
1 file changed, 1 insertion(+), 22 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/08/12108/1
diff --git a/tests/schemaTests.py b/tests/schemaTests.py
index 9bf4b5b..ae82b9f 100644
--- a/tests/schemaTests.py
+++ b/tests/schemaTests.py
@@ -18,30 +18,9 @@
#
from testrunner import VdsmTestCase as TestCaseBase
-import os.path
import vdsmapi
-from vdsm import constants
-
-
-def findSchema():
- """
- Find the API schema file whether we are running tests from the source dir
- or from the tests install location
- """
- scriptdir = os.path.dirname(__file__)
- localpath = os.path.join(scriptdir, '../vdsm_api/vdsmapi-schema.json')
- installedpath = os.path.join(constants.P_VDSM, 'vdsmapi-schema.json')
- for f in localpath, installedpath:
- if os.access(f, os.R_OK):
- return f
- raise Exception("Unable to find schema in %s or %s" % (localpath,
- installedpath))
class SchemaTest(TestCaseBase):
- def setUp(self):
- self.schema = findSchema()
-
def testSchemaParse(self):
- with open(self.schema) as f:
- vdsmapi.parse_schema(f)
+ self.assertTrue(isinstance(vdsmapi.get_api(), dict))
--
To view, visit http://gerrit.ovirt.org/12108
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3e5716fcb9724621f4fb282746bf02958b1972d4
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <agl at us.ibm.com>
More information about the vdsm-patches
mailing list