def test_validate_dest_dict_invalid_swift_url_3(self):
        to_test = DataMoverServices(None, None)

        dest  = 'swift+http://nectar//'
        valid, reason = to_test._validate_destination(dest, True)

        self.assertFalse(valid)
        self.assertEqual(REASON_INVALID_SWIFT_URL.format("destination", "'%s'" %dest), reason)
    def test_validate_dest_dict_swift_url(self):
        to_test = DataMoverServices(None, None)

        dest  = 'swift+http://nectar/container/path/to/file1'
        valid, reason = to_test._validate_destination(dest, False)

        self.assertTrue(valid)
        self.assertEqual('', reason)
    def test_validate_dest_dict_invalid_2(self):
        to_test = DataMoverServices(None, None)

        dest = 'scp://the_host'
        valid, reason = to_test._validate_destination(dest, False)

        self.assertFalse(valid)
        self.assertEqual(REASON_PATH_NOT_SPECIFIED_1S.format('destination'), reason)
    def test_validate_dest_dict_invalid_3(self):
        to_test = DataMoverServices(None, None)

        dest = 'scp://the_host/the_path'
        valid, reason = to_test._validate_destination(dest, 'True')

        self.assertFalse(valid)
        self.assertEqual(REASON_INVALID_PARAMS_1S.format('zip must be of type bool'), reason)
    def test_validate_dest_dict_valid_1(self):
        to_test = DataMoverServices(None, None)

        dest = 'scp://the_host/the_path'
        valid, reason = to_test._validate_destination(dest, True)

        self.assertTrue(valid)
        self.assertEqual('', reason)