Пример #1
0
 def test_reads_root_node(self):
         mmap = MapReader().read('<map><node/></map>')
         assert_that(mmap.root(), not_none())
Пример #2
0
 def test_reads_branch_text(self):
         mmap = MapReader().read('<map><node TEXT="foo"><node></node><node TEXT="bar"></node></node></map>')
         assert_that((mmap.root().text()), equal_to("foo"))
         assert_that((mmap.root().branch(0).text()), none())
         assert_that((mmap.root().branch(1).text()), equal_to("bar"))
Пример #3
0
 def test_reads_notes(self):
         mmap = MapReader().read('<map><node><richcontent TYPE="NOTE"><html/></richcontent></node></map>')
         assert_that(mmap.root().note(), equal_to("<html/>"))
Пример #4
0
 def test_reads_links(self):
         mmap = MapReader().read('<map><node LINK="foo"><node></node><node></node></node></map>')
         assert_that(mmap.root().link(), equal_to("foo"))
Пример #5
0
 def test_reads_icons(self):
         mmap = MapReader().read('<map><node><node></node><icon BUILTIN="button_ok"/><node></node></node></map>')
         assert_that(mmap.root().icons(), contains(Icons.icon('button_ok')))
Пример #6
0
 def test_reads_branches(self):
         mmap = MapReader().read('<map><node><node></node><icon BUILTIN="button_ok"/><node></node></node></map>')
         assert_that(len(mmap.root().branches()), equal_to(2))