def test(self):
    tmpfile = self._CreateTempFile()

    utils.WriteFile(tmpfile, data="""
      # This is a test file
      /tmp
      /srv/storage
      relative/path
      """)

    self.assertEqual(filestorage._LoadAllowedFileStoragePaths(tmpfile), [
      "/tmp",
      "/srv/storage",
      "relative/path",
      ])
  def test(self):
    tmpfile = self._CreateTempFile()

    utils.WriteFile(tmpfile, data="""
      # This is a test file
      /tmp
      /srv/storage
      relative/path
      """)

    self.assertEqual(filestorage._LoadAllowedFileStoragePaths(tmpfile), [
      "/tmp",
      "/srv/storage",
      "relative/path",
      ])
 def testNonExistantFile(self):
     filename = "/tmp/this/file/does/not/exist"
     assert not os.path.exists(filename)
     self.assertEqual(filestorage._LoadAllowedFileStoragePaths(filename),
                      [])
 def testDevNull(self):
     self.assertEqual(filestorage._LoadAllowedFileStoragePaths("/dev/null"),
                      [])
 def testDevNull(self):
   self.assertEqual(filestorage._LoadAllowedFileStoragePaths("/dev/null"), [])
 def testNonExistantFile(self):
   filename = "/tmp/this/file/does/not/exist"
   assert not os.path.exists(filename)
   self.assertEqual(filestorage._LoadAllowedFileStoragePaths(filename), [])