Skip to content

Commit

Permalink
Refactor and limit verification
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Oct 2, 2014
1 parent f408ec6 commit 0ad816b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class BaseTestCase(TestCase):
title = 'Application To Platform'
directory_name = 'application-to-platform'
example_file = 'atp.md'
presentation_index = '%s/index.html' % directory_name

def setUp(self):
with open(self.example_file, 'w') as f:
Expand Down
16 changes: 7 additions & 9 deletions tests/test_remarkable.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,30 @@
class TestRemarkTestCase(BaseTestCase):

def test_remark(self):
presentation_index = '%s/index.html' % self.directory_name
sys.argv = [
'remarkable',
'remark',
self.example_file,
self.title,
]
cli.main()
self.assertTrue(os.path.exists(presentation_index))
presentation_contents = io.open(presentation_index).read()
self.assertTrue(os.path.exists(self.presentation_index))
presentation_contents = io.open(self.presentation_index).read()
self.assertTrue(self.title in presentation_contents)
self.assertTrue('michaeljoseph' in presentation_contents)
shutil.rmtree('application-to-platform')
shutil.rmtree(self.directory_name)


class TestRevealTestCase(BaseTestCase):

def test_reveal(self):
presentation_index = 'application-to-platform/index.html'
sys.argv = [
'remarkable',
'reveal',
self.example_file,
self.title,
]
cli.main()
self.assertTrue(os.path.exists(presentation_index))
self.assertTrue(self.title in io.open(presentation_index).read())
shutil.rmtree('application-to-platform')
self.assertTrue(os.path.exists(self.presentation_index))
presentation_contents = io.open(self.presentation_index).read()
self.assertTrue(self.title in presentation_contents)
shutil.rmtree(self.directory_name)

0 comments on commit 0ad816b

Please sign in to comment.