def test_dir_exists(self): """ Tests the methods that checks if a directory exists.""" self.assertTrue(Common.dir_exists(self.dir_a)) self.assertFalse(Common.dir_exists(None)) self.assertFalse(Common.dir_exists('')) self.assertFalse(Common.dir_exists('/fake/dir'))
def test_create_dir(self): """ Tests the method that creates a directory.""" self.assertFalse(Common.create_dir('')) self.assertFalse(Common.create_dir(None)) # Create the dir self.assertTrue(Common.create_dir(self.test_data_root + 'Z')) # Delete the dir self.assertTrue(Common.delete_dir(self.test_data_root + 'Z')) # Now check dir was deleted self.assertFalse(Common.dir_exists(self.test_data_root + 'Z'))