Exemple #1
0
    def test_default_target(self):
        '''Verify default local target url

        '''
        target = OpenerTarget(self.local_file)
        self.assertEqual(type(target), LocalTarget)

        # Write to the target
        target.open('w').close()
        self.assertTrue(LocalTarget.fs.exists(self.local_file))
Exemple #2
0
    def test_mock_target_root(self):
        '''Verify mock target url

        '''
        target = OpenerTarget('mock:///foo/bar.txt')
        self.assertEqual(type(target), MockTarget)

        # Write to the target
        target.open('w').close()
        self.assertTrue(MockTarget.fs.exists('/foo/bar.txt'))
Exemple #3
0
    def test_default_target(self):
        '''Verify default local target url

        '''
        target = OpenerTarget(self.local_file)
        self.assertEqual(type(target), LocalTarget)

        # Write to the target
        target.open('w').close()
        self.assertTrue(LocalTarget.fs.exists(self.local_file))
Exemple #4
0
    def test_mock_target_root(self):
        '''Verify mock target url

        '''
        target = OpenerTarget('mock:///foo/bar.txt')
        self.assertEqual(type(target), MockTarget)

        # Write to the target
        target.open('w').close()
        self.assertTrue(MockTarget.fs.exists('/foo/bar.txt'))
Exemple #5
0
    def test_local_target(self):
        '''Verify basic local target url

        '''
        local_file = "file://{}".format(self.local_file)
        target = OpenerTarget(local_file)
        self.assertEqual(type(target), LocalTarget)

        # Write to the target
        target.open('w').close()
        self.assertTrue(LocalTarget.fs.exists(self.local_file))
Exemple #6
0
    def test_local_target(self):
        '''Verify basic local target url

        '''
        local_file = "file://{}".format(self.local_file)
        target = OpenerTarget(local_file)
        self.assertEqual(type(target), LocalTarget)

        # Write to the target
        target.open('w').close()
        self.assertTrue(LocalTarget.fs.exists(self.local_file))