Project

General

Profile

Bug #8848

Si feedparser n'est pas installé, le test test_admin_pages.py:test_workflows_edit_status

Added by Benjamin Dauvergne about 7 years ago. Updated almost 7 years ago.

Status:
Fermé
Priority:
Bas
Assignee:
-
Target version:
Start date:
03 November 2015
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:

Description

Aussi ce test ne passe pas tout seul car l'initialisation du publisher n'est pas complète; il dépend du fait qu'un test précédent ait créé l'utilisateur admin.


Files

Associated revisions

Revision 2dddd3bd (diff)
Added by Frédéric Péters about 7 years ago

tests: fix backoffice_info_test assertion in case of missing feedparser (#8848)

Revision 76e4bec2 (diff)
Added by Frédéric Péters about 7 years ago

tests: add basic checks for WysiwygWidget (#8848)

History

#1

Updated by Benjamin Dauvergne about 7 years ago

=================================================================================== FAILURES ===================================================================================
______________________________________________________________________ test_workflows_edit_status[pickle] ______________________________________________________________________

pub = <wcs.publisher.WcsPublisher instance at 0x7fd5fd7ffea8>

    def test_workflows_edit_status(pub):
        create_superuser(pub)
        Workflow.wipe()
        workflow = Workflow(name='foo')
        workflow.add_status(name='baz')
        workflow.store()

        app = login(get_app(pub))
        resp = app.get('/backoffice/workflows/1/')
        resp = resp.click('baz')

        resp = resp.click('Change Status Name')
        resp.forms[0]['name'] = 'bza'
        resp = resp.forms[0].submit()
        assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/'
        resp = resp.follow()
        assert Workflow.get(1).possible_status[0].name == 'bza'

        resp = resp.click('Change Status Visibility')
        resp.forms[0]['hide_status_from_user'].checked = True
        resp = resp.forms[0].submit()
        assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/'
        resp = resp.follow()
        assert Workflow.get(1).possible_status[0].visibility == ['_receiver']

        resp = resp.click('Change Terminal Status')
        resp.forms[0]['force_terminal_status'].checked = True
        resp = resp.forms[0].submit()
        assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/'
        resp = resp.follow()
        assert Workflow.get(1).possible_status[0].forced_endpoint == True

        resp = resp.click('Change Status Colour')
        assert resp.forms[0]['colour'].value == 'FFFFFF'
        resp.forms[0]['colour'] = 'FF0000'
        resp = resp.forms[0].submit()
        assert resp.location == 'http://example.net/backoffice/workflows/1/status/1/'
        resp = resp.follow()
        assert Workflow.get(1).possible_status[0].colour == 'FF0000'

        resp = resp.click('Change Backoffice Information Text')
        assert resp.forms[0]['backoffice_info_text'].value == ''
        resp.forms[0]['backoffice_info_text'] = '<p>Hello</p>'
        import pdb
        pdb.set_trace()
>       resp = resp.forms[0].submit()
E       assert '&lt;p&gt;Hello&lt;/p&gt;' == '<p>Hello</p>'
E         - &lt;p&gt;Hello&lt;/p&gt;
E         + <p>Hello</p>

tests/test_admin_pages.py:1253: AssertionError
============================================================ 170 tests deselected by '-ktest_workflows_edit_status' ============================================================
============================================================= 1 failed, 1 skipped, 170 deselected in 36.49 seconds =============================================================
#2

Updated by Benjamin Dauvergne about 7 years ago

  • Description updated (diff)
#3

Updated by Frédéric Péters about 7 years ago

Un premier test pour passer outre la différence.

Un second test ailleurs pour s'assurer de manière minimale du comportement de WysiwygWidget.

#4

Updated by Benjamin Dauvergne about 7 years ago

  • Target version set to v1.20

Ack.

#5

Updated by Frédéric Péters about 7 years ago

  • Status changed from En cours to Résolu (à déployer)
commit 76e4bec2bd12a3ec59687a96d1b9699177a83e0a
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Tue Nov 3 14:38:42 2015 +0100

    tests: add basic checks for WysiwygWidget (#8848)

commit 2dddd3bd9142bcb5887d040d9f62ef315de70962
Author: Frédéric Péters <fpeters@entrouvert.com>
Date:   Tue Nov 3 14:38:00 2015 +0100

    tests: fix backoffice_info_test assertion in case of missing feedparser (#8848)
#6

Updated by Frédéric Péters almost 7 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF