def test_no_words_file(): # using sqlite for lazy-loading of site data, otherwise the `load` call # will fail too. c = config.load(open(os.path.join(datadir, 'no-words.sqlite'), 'rb')) assert c.words is None with pytest.raises(ValueError): c.generate_for_site(None, 'passacre', 'example.com')
def config_obj(self): os.chdir(datadir) return config.load(open(self.config_file, 'rb'))
def setUp(self): os.chdir(datadir) self.config = config.load(open(self.config_file, 'rb'))