mirror of
https://github.com/kennethreitz-archive/sphinx-to-github.git
synced 2026-06-05 23:40:17 +00:00
e98c23737e
Tests for Layout, LayoutFactory and setup(app). Resulted in structuring some code so that LayoutFactory uses other factories to generate the helpers and handlers for the Layout.
29 lines
547 B
Python
29 lines
547 B
Python
|
|
from sphinxtogithub.tests import MockExists, MockRemove
|
|
|
|
import sphinxtogithub
|
|
import unittest
|
|
|
|
class TestRemover(unittest.TestCase):
|
|
|
|
def testCall(self):
|
|
|
|
exists = MockExists()
|
|
remove = MockRemove()
|
|
remover = sphinxtogithub.Remover(exists, remove)
|
|
|
|
filepath = "filepath"
|
|
remover(filepath)
|
|
|
|
self.assertEqual(filepath, exists.name)
|
|
self.assertEqual(filepath, remove.name)
|
|
|
|
|
|
def testSuite():
|
|
suite = unittest.TestSuite()
|
|
|
|
suite.addTest(TestRemover("testCall"))
|
|
|
|
return suite
|
|
|