Exemplo n.º 1
0
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')
Exemplo n.º 2
0
 def config_obj(self):
     os.chdir(datadir)
     return config.load(open(self.config_file, 'rb'))
Exemplo n.º 3
0
 def setUp(self):
     os.chdir(datadir)
     self.config = config.load(open(self.config_file, 'rb'))