Remove non dev dependency on mox
Change-Id: I49267ebbf11b1898ab14216046369ff4720dbd82 Closes-Bug: 1288245
This commit is contained in:
parent
857ccf9ccc
commit
01133b7ce2
@ -186,7 +186,7 @@ class JasmineTests(SeleniumTestCase):
|
||||
through Selenium
|
||||
|
||||
To run a jasmine test suite create a class which extends JasmineTests in
|
||||
the :file:`horizon/test/jasmine/jasmine.py` and define two classes
|
||||
the :file:`horizon/test/jasmine/jasmine_tests.py` and define two class
|
||||
attributes
|
||||
|
||||
.. attribute:: sources
|
||||
|
@ -14,13 +14,17 @@
|
||||
|
||||
import django.shortcuts
|
||||
import django.views.defaults
|
||||
from horizon.test import helpers as test
|
||||
import inspect
|
||||
import sys
|
||||
|
||||
|
||||
def dispatcher(request, test_name):
|
||||
classes = inspect.getmembers(sys.modules[__name__], inspect.isclass)
|
||||
#import is included in this non-standard location to avoid
|
||||
#problems importing mox. See bug/1288245
|
||||
from horizon.test.jasmine import jasmine_tests as tests
|
||||
classes = inspect.getmembers(sys.modules[tests.__name__],
|
||||
inspect.isclass)
|
||||
|
||||
if not test_name:
|
||||
return django.shortcuts.render(
|
||||
request,
|
||||
@ -41,11 +45,3 @@ def dispatcher(request, test_name):
|
||||
{'specs': cls.specs, 'sources': cls.sources})
|
||||
|
||||
return django.views.defaults.page_not_found(request)
|
||||
|
||||
|
||||
class ServicesTests(test.JasmineTests):
|
||||
sources = [
|
||||
'horizon/js/angular/horizon.conf.js',
|
||||
'horizon/js/angular/services/horizon.utils.js'
|
||||
]
|
||||
specs = ['horizon/tests/jasmine/utilsSpec.js']
|
||||
|
21
horizon/test/jasmine/jasmine_tests.py
Normal file
21
horizon/test/jasmine/jasmine_tests.py
Normal file
@ -0,0 +1,21 @@
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from horizon.test import helpers as test
|
||||
|
||||
|
||||
class ServicesTests(test.JasmineTests):
|
||||
sources = [
|
||||
'horizon/js/angular/horizon.conf.js',
|
||||
'horizon/js/angular/services/horizon.utils.js'
|
||||
]
|
||||
specs = ['horizon/tests/jasmine/utilsSpec.js']
|
Loading…
Reference in New Issue
Block a user