[FIX] imports, use @expectedFailure, simplify some inject specs

bzr revid: xmo@openerp.com-20140218160339-2r34z4ks2o4lriu5
This commit is contained in:
Xavier Morel 2014-02-18 17:03:39 +01:00
parent c42f9553ec
commit 61c82f28a4
5 changed files with 14 additions and 12 deletions

View File

@ -4,9 +4,11 @@ import unittest2
import openerp.tests
relfile = lambda *args: os.path.join(os.path.dirname(__file__), *args)
inject = [
("openerp.website.Tour", os.path.join(os.path.dirname(__file__), '../static/src/js/website.tour.js')),
("openerp.website.Tour.LoginEdit", os.path.join(os.path.dirname(__file__), "../static/src/js/website.tour.test.admin.js")),
('openerp.website.Tour', relfile('../static/src/js/website.tour.js')),
('openerp.website.Tour.LoginEdit', relfile('../static/src/js/website.tour.test.admin.js')),
]
class TestUi(openerp.tests.HttpCase):

View File

@ -1,4 +1,4 @@
import openerp
import openerp.tests
class TestUi(openerp.tests.HttpCase):
def test_admin(self):

View File

@ -1,4 +1,4 @@
import openerp
import openerp.tests
class TestUi(openerp.tests.HttpCase):
def test_admin(self):

View File

@ -1,4 +1,4 @@
import openerp
import openerp.tests
inject = [
"./../../../website/static/src/js/website.tour.test.js",

View File

@ -1,6 +1,8 @@
import os
import openerp
import unittest2
import openerp.tests
inject = [
("openerp.website.Tour", os.path.join(os.path.dirname(__file__), '../../website/static/src/js/website.tour.js')),
@ -8,21 +10,19 @@ inject = [
]
class TestUi(openerp.tests.HttpCase):
@unittest2.expectedFailure
def test_01_admin_shop_tour(self):
# Works locally probably due to a race condition on openerp.website.Tour.Shop
# object should only be define once ready
return
self.phantom_js("/", "openerp.website.Tour.run_test('shop')", "openerp.website.Tour.Shop", login="admin")
@unittest2.expectedFailure
def test_02_admin_checkout(self):
return
self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour", login="admin")
@unittest2.expectedFailure
def test_03_demo_checkout(self):
return
self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour.ShopTest", login="demo", inject=inject)
@unittest2.expectedFailure
def test_04_public_checkout(self):
return
self.phantom_js("/", "openerp.website.Tour.run_test('shop_buy_product')", "openerp.website.Tour.ShopTest", inject=inject)