boxnotes2html

Convert Box's proprietary Box Notes to HTML, Markdown, or plain text
git clone git://git.alexwennerberg.com/boxnotes2html
Log | Files | Refs | README | LICENSE

test_boxnote.py (969B) - raw


      1 from boxnotes2html import BoxNote
      2 from fixtures.notes import *
      3 
      4 
      5 def test_boxnote_loads(simple_note):
      6     assert simple_note
      7     assert simple_note.text
      8     assert simple_note.attribute_pool
      9 
     10 
     11 def test_loads_from_file(simple_note_fullpath):
     12     boxnote = BoxNote.from_file(simple_note_fullpath)
     13     assert boxnote
     14     assert str(boxnote)
     15 
     16 
     17 def test_simple_note_metadata(simple_note):
     18     # WIP
     19     assert simple_note.get_metadata()
     20 
     21 
     22 def test_simple_note_parsing(simple_note):
     23     return
     24 
     25 
     26 def test_attribute_chunk(simple_attribute):
     27     assert simple_attribute
     28     assert simple_attribute.attributes == set([1, 36, 4])
     29     assert simple_attribute.num_characters == 3
     30 
     31 
     32 def test_attributes(simple_note):
     33     assert simple_note.attribute_chunks
     34 
     35 
     36 def test_convert_to_html(simple_note):
     37     print(simple_note.as_html())
     38     assert simple_note.as_html()
     39 
     40 
     41 def test_convert_to_html_complex(complex_note):
     42     print(complex_note.as_html())
     43     assert complex_note.as_html()