def gen_temp_planet(feed): name = feed.split(".")[0] if '.' in feed else feed p = make_temp_planet(name, True) p.add_feed(os.path.join(feed_dir, feed), feed) remove_direc_contents(os.path.join(opt['output_dir'], p.direc, "*")) p.generate() return name
def not_in_db_test(s): name = "delete_test" p = make_temp_planet(name, True) with our_db('planets') as db: del db[name] p.delete() p = Planet(direc=name)
def setup_class(cls): cls.planet_name = "admin_test" cls.planet_url = opt['base_href']+cls.planet_name+"/" make_temp_planet(cls.planet_name) cls.browser = webdriver.Firefox()
def setup_class(cls): p = make_temp_planet(cls.name, get_planet=True) p.add_feed(cls.url, cls.user, cls.image, save=True) cls.planet = Planet(direc=cls.name)
def missing_on_disk_test(s): name = "delete_test" p = make_temp_planet(name, True) shutil.rmtree(os.path.join(opt['output_dir'], name)) p.delete() p = Planet(direc=name)
def already_deleted_test(s): name = "delete_test" p = make_temp_planet(name, True) p.delete() p.delete() p = Planet(direc=name)