<commit_before>import os

import unittest2

import openerp.tests

relfile = lambda *args: os.path.join(os.path.dirname(__file__), *args)

inject = [
    ('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):
    def test_01_public_homepage(self):
        self.phantom_js("/", "console.log('ok')", "openerp.website.snippet")

    @unittest2.expectedFailure
    def test_02_public_login_logout(self):
        self.phantom_js("/", "openerp.website.Tour.run_test('login_edit')", "openerp.website.Tour", inject=inject)

    def test_03_admin_homepage(self):
        self.phantom_js("/", "console.log('ok')", "openerp.website.editor", login='admin')

    def test_04_admin_tour_banner(self):
        self.phantom_js("/", "openerp.website.Tour.run_test('banner')", "openerp.website.Tour", login='admin')

# vim:et:
<commit_msg>[REM] broken and PITA test_02_public_login_logout<commit_after>import os

import openerp.tests

class TestUi(openerp.tests.HttpCase):
    def test_01_public_homepage(self):
        self.phantom_js("/", "console.log('ok')", "openerp.website.snippet")

    def test_03_admin_homepage(self):
        self.phantom_js("/", "console.log('ok')", "openerp.website.editor", login='admin')

    def test_04_admin_tour_banner(self):
        self.phantom_js("/", "openerp.website.Tour.run_test('banner')", "openerp.website.Tour", login='admin')

# vim:et:

{'fraction_non_alphanumeric': 0.17468688200395519, 'fraction_numerical': 0.011865524060646011, 'mean_word_length': 4.771863117870723, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6250957', 'n_tokens_mistral': 597, 'n_tokens_neox': 545, 'n_words': 71}