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_cli.py (888B) - raw


      1 from unittest.mock import patch
      2 
      3 from boxnotes2html import cli
      4 
      5 
      6 @patch("boxnotes2html.cli.write_file")
      7 def test_command_line_runs(write_file):
      8     args = ["a", "b", "-f", "md"]
      9     cli.run_with_args(args)
     10     assert write_file.call_count == 2
     11 
     12 
     13 def test_everything():
     14     for txtfmt in "md", "txt", "html":
     15         args = ["tests/fixtures", "-f", txtfmt]
     16         cli.run_with_args(args)
     17 
     18 
     19 def test_table_simple():
     20     args = ["tests/fixtures/table-simple.boxnote", "-f", "md"]
     21     cli.run_with_args(args)
     22 
     23 
     24 def test_table_multiline():
     25     args = ["tests/fixtures/table-multiline.boxnote", "-f", "md"]
     26     cli.run_with_args(args)
     27     
     28 
     29 def test_table_aligned():
     30     args = ["tests/fixtures/table-aligned.boxnote", "-f", "md"]
     31     cli.run_with_args(args)
     32 
     33 
     34 def test_same_line_formatting():
     35     args = ["tests/fixtures/same-line-formatting.boxnote", "-f", "md"]
     36     cli.run_with_args(args)