예제 #1
0
    def setUp(self):
        self.full_arg_data = {
            'local_path': os.path.abspath(os.path.join('repos', 'local_path')),
            'uri': 'github.com:sample/remote_name',
            'name': 'local_path',
            'vcs': 'git',
            'good': 'abc1234',
            'bad': '1234abc',
        }

        self.full_arg = driver.make_arg(self.full_arg_data)

        self.simple_arg_data = self.full_arg_data.copy()
        self.simple_arg_data['uri'] = self.simple_arg_data['local_path']
        self.simple_arg = driver.make_arg(self.simple_arg_data)
예제 #2
0
 def test_make_arg_with_uri(self):
     full_arg = driver.make_arg(self.full_arg_data)
     self.assertEqual(
         full_arg,
         "GIT%(uri)s->%(local_path)s@%(good)s..%(bad)s" % self.full_arg_data
     )
예제 #3
0
 def test_make_arg_no_uri(self):
     simple_arg = driver.make_arg(self.simple_arg_data)
     self.assertEqual(
         simple_arg,
         "GIT%(local_path)s@%(good)s..%(bad)s" % self.simple_arg_data
     )