示例#1
0
 def runTest(self):
     ''' Execute '''
     self.config['articles']['config'] = "/tmp/testcase3"
     self.assertEqual(load_post_config(self.config), {})
 def runTest(self, mock_os, mock_open):
     ''' Execute Test '''
     mock_os.listdir = []
     self.assertEqual(load_post_config(self.config), {})
     self.assertFalse(mock_open.called,
                      "Failed to handle empty directories")
示例#3
0
 def runTest(self):
     ''' Execute '''
     self.config['articles']['config'] = "/tmp/testcase2"
     self.assertEqual(load_post_config(self.config), self.desired_return)
 def runTest(self, mock_os, mock_path, mock_open):
     ''' Execute Test '''
     mock_os.listdir = ['directory']
     mock_path.isfile = False
     self.assertEqual(load_post_config(self.config), {})
     self.assertFalse(mock_open.called, "Failed to test if file existed")