Conjunto de mudanças 6486 no repositório publico


Ignorar:
Timestamp:
13/06/2012 15:55:54 (9 anos atrás)
Autor:
mazza
Mensagem:

testes refatorados

Arquivo:
1 editado

Legenda:

Não Modificado
Adicionado
Removido
  • PortalInterlegis/produtos/il.portalinterlegis/trunk/src/il/portalinterlegis/tests/testintegration.py

    r6485 r6486  
    3535        base = self.portal.absolute_url()
    3636        if path:
     37            path.strip('/')
    3738            return '%s/%s' % (base, path)
    3839        else:
     
    4950
    5051    def test_tabs_na_home(self):
    51         browser = self.new_browser()
     52        browser = self.layer.anonymous_browser()
     53        browser.open(self.url())
    5254        dom = self.dom(browser)
    5355        self.assertEqual([u'O Interlegis',
     
    7880
    7981        def use_box_form(title, subtitle, text, num):
    80             browser = self.new_browser(boxmanager._box_name_for_url(num), as_admin=True)
     82            browser = self.layer.manager_browser()
     83            browser.open(self.url(boxmanager._box_name_for_url(num)))
    8184            browser.getControl(name='form.widgets.title').value = title
    8285            browser.getControl(name='form.widgets.subtitle').value = subtitle
     
    9396    def test_box_forms_numbers_begin_from_1_not_zero(self):
    9497        with self.assertRaises(NotFound):
    95             browser = self.new_browser(BoxManager(ISimpleBox)._box_name_for_url(0), as_admin=True)
     98            browser = self.layer.manager_browser()
     99            browser.open(self.url(BoxManager(ISimpleBox)._box_name_for_url(0)))
    96100
    97101    def test_box_forms_are_limited(self):
    98102        with self.assertRaises(NotFound):
    99             browser = self.new_browser(BoxManager(ISimpleBox)._box_name_for_url(1000000), as_admin=True)
     103            browser = self.layer.manager_browser()
     104            browser.open(self.url(BoxManager(ISimpleBox)._box_name_for_url(1000000)))
    100105
    101106    def test_box_form_cannot_be_created_after_initialization(self):
    102107        BoxManager(ISimpleBox).build_form(99) # try to build a box form in an arbitrary moment
    103108        with self.assertRaises(NotFound):
    104             browser = self.new_browser(BoxManager(ISimpleBox)._box_name_for_url(99), as_admin=True)
     109            browser = self.layer.manager_browser()
     110            browser.open(self.url(BoxManager(ISimpleBox)._box_name_for_url(99)))
Note: Veja TracChangeset para ajuda no uso do visualizador de conjunto de mudanças.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.