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)
def test_open_without_handler_returns_none(self): opener = URItoFileOpener() manifest_file = opener.open(TESTS['Manifest.rdf']) self.assertEqual(manifest_file, None)