Ejemplo n.º 1
0
    def test_initialization (self):
        
        b = Bologna.create(self.bologna_path)
        self.assertTrue(b.path == self.bologna_path)
        self.assertTrue(Bologna.exists(self.bologna_path))

        # Test to make sure it removes itself properly
        Bologna.delete(self.bologna_path)
        self.assertTrue(not Bologna.exists(self.bologna_path))
Ejemplo n.º 2
0
 def test_loading_posts (self):
     
     b = Bologna.create(self.bologna_path)
     self.assertTrue(len(b.posts) == 1)
     
     # Make sure all the paths exist.
     for post in b.posts:
         self.assertTrue(os.path.exists(post.path))
Ejemplo n.º 3
0
 def test_build (self):
     
     # NOTE: This need some actual work this doesn't really test
     # anything. Should probably add some logic to test individual build
     # directives (the base line ones? I don't know, to make sure they
     # get laoded etc).
     b = Bologna.create(self.bologna_path)
     build_path = os.path.join(self.bologna_path, 'html')
     output = b.build(build_path)
     self.assertTrue(os.path.exists(build_path))
Ejemplo n.º 4
0
 def tearDown (self):
     if Bologna.exists(self.bologna_path):
         Bologna.delete(self.bologna_path)