Exemplo n.º 1
0
 def test_creates_config_file(self):
     with flake.environment('config stuff', 'foo', 'foo/bar.py') as env:
         assert open(env.config_filename).read() == 'config stuff'
Exemplo n.º 2
0
 def test_cleans_up(self):
     with flake.environment('config stuff', 'foo', 'foo/bar.py') as env:
         pass
     assert not os.path.exists(env.config_filename)
     assert not os.path.exists(env.filename)
Exemplo n.º 3
0
 def test_creates_check_file(self, filename):
     content = binascii.hexlify(os.urandom(32)).decode('utf8')
     with flake.environment('config stuff', content, filename) as env:
         assert open(env.filename).read() == content
Exemplo n.º 4
0
 def test_cleans_up(self):
     with flake.environment('config stuff', 'foo', 'foo/bar.py') as env:
         pass
     assert not os.path.exists(env.config_filename)
     assert not os.path.exists(env.filename)
Exemplo n.º 5
0
 def test_creates_check_file(self, filename):
     content = binascii.hexlify(os.urandom(32)).decode('utf8')
     with flake.environment('config stuff', content, filename) as env:
         assert open(env.filename).read() == content
Exemplo n.º 6
0
 def test_creates_config_file(self):
     with flake.environment('config stuff', 'foo', 'foo/bar.py') as env:
         assert open(env.config_filename).read() == 'config stuff'