예제 #1
0
파일: commandTests.py 프로젝트: wyn/collab
    def test_fromElement_noContent(self):
        el = Element((None, 'note'))
        el['type'] = 'error'
        n = Note.fromElement(el)

        self.assertEquals(n.note_type, 'error')
        self.assertEquals(n.content, '')
예제 #2
0
파일: commandTests.py 프로젝트: wyn/collab
    def test_fromElement_bad(self):
        el = Element((None, 'note'))
        el['type'] = 'wrong'
        el.addContent('bla')
        n = Note.fromElement(el)

        self.assertEquals(n.note_type, 'warn')
        self.assertEquals(n.content, 'bla')