Example #1
0
 def test_get_filepath(self):
     testfile = tempfile.NamedTemporaryFile(prefix='bitten_test')
     config = Configuration(properties={'somepkg.path': testfile.name})
     self.assertEqual(testfile.name, config.get_filepath('somepkg.path'))
Example #2
0
 def test_get_filepath(self):
     testfile = tempfile.NamedTemporaryFile(prefix='bitten_test')
     config = Configuration(properties={'somepkg.path': testfile.name})
     self.assertEqual(testfile.name, config.get_filepath('somepkg.path'))
Example #3
0
 def test_get_filepath_non_existant(self):
     testfile, testname = tempfile.mkstemp(prefix='bitten_test')
     os.close(testfile)
     os.remove(testname)
     config = Configuration(properties={'somepkg.path': testname})
     self.assertEqual(None, config.get_filepath('somepkg.path'))
Example #4
0
 def test_get_filepath_non_existant(self):
     testfile, testname = tempfile.mkstemp(prefix='bitten_test')
     os.close(testfile)
     os.remove(testname)
     config = Configuration(properties={'somepkg.path': testname})
     self.assertEqual(None, config.get_filepath('somepkg.path'))