コード例 #1
0
ファイル: test_opener.py プロジェクト: exogen/python-rdf
class TestOpener(unittest.TestCase):
    def setUp(self):
        self.opener = URItoFileOpener(PATH_MAP)
        self.manifest_file = open_data_file('rdfcore/Manifest.rdf')

    def test_is_opener_director(self):
        self.assert_(isinstance(self.opener, OpenerDirector))

    def test_open_with_handler_returns_file(self):
        manifest_file = self.opener.open(TESTS['Manifest.rdf'])
        self.assertEqual(manifest_file.read(), self.manifest_file.read())

    def test_open_without_handler_returns_none(self):
        opener = URItoFileOpener()
        manifest_file = opener.open(TESTS['Manifest.rdf'])
        self.assertEqual(manifest_file, None)
コード例 #2
0
class TestOpener(unittest.TestCase):
    def setUp(self):
        self.opener = URItoFileOpener(PATH_MAP)
        self.manifest_file = open_data_file('rdfcore/Manifest.rdf')

    def test_is_opener_director(self):
        self.assert_(isinstance(self.opener, OpenerDirector))

    def test_open_with_handler_returns_file(self):
        manifest_file = self.opener.open(TESTS['Manifest.rdf'])
        self.assertEqual(manifest_file.read(), self.manifest_file.read())

    def test_open_without_handler_returns_none(self):
        opener = URItoFileOpener()
        manifest_file = opener.open(TESTS['Manifest.rdf'])
        self.assertEqual(manifest_file, None)
コード例 #3
0
ファイル: test_opener.py プロジェクト: exogen/python-rdf
 def test_open_without_handler_returns_none(self):
     opener = URItoFileOpener()
     manifest_file = opener.open(TESTS['Manifest.rdf'])
     self.assertEqual(manifest_file, None)
コード例 #4
0
 def test_open_without_handler_returns_none(self):
     opener = URItoFileOpener()
     manifest_file = opener.open(TESTS['Manifest.rdf'])
     self.assertEqual(manifest_file, None)