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'))
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'))
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'))
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'))