def test_get_root(self): """ dirs.get_root """ self.assertEquals(dirs.get_root(), settings.STATIC_ROOT) with self.settings(MEDIABRUTE_USE_STATIC=False): self.assertEquals(dirs.get_root(), settings.MEDIA_ROOT)
def test_js_dir(self): """ Main JS directory default setting test should match either settings.JS_DIR or just "js" Test that it works as a fullpath AND standalone """ fullpath = dirs.get_main_js_dir() ext_only = dirs.get_main_js_dir(full_path=False) try: ext_compare = settings.JS_DIR except AttributeError: ext_compare = defaults.JS_DIR fullpath_compare = os.path.join(dirs.get_root(), ext_compare) self.assertEquals(fullpath_compare, fullpath) self.assertEquals(ext_compare, ext_only)