Ejemplo n.º 1
0
 def test_required_options_with_file_type2(self):
     auth_token = "authToken"
     repository = "repository"
     owner = "owner"
     tag = "tag"
     path = "pygithubctl"
     type = "file"
     destination = "/home/user/git"
     http_ssl_verify = True
     options = get_options(['fetch',
                            '--auth-token', auth_token,
                            '--repository', repository,
                            '--owner', owner,
                            '--tag', tag,
                            '--path', path,
                            '--type', type,
                            '--destination', destination,
                            '--http-ssl-verify', str(http_ssl_verify)])
     self.assertTrue(options.auth_token)
     self.assertEqual(options.auth_token, auth_token)
     self.assertTrue(options.repository)
     self.assertEqual(options.repository, repository)
     self.assertTrue(options.owner)
     self.assertEqual(options.owner, owner)
     self.assertTrue(options.tag)
     self.assertEqual(options.tag, tag)
     self.assertTrue(options.destination)
     self.assertEqual(options.destination, destination)
     self.assertTrue(options.http_ssl_verify)
     self.assertEqual(options.http_ssl_verify, http_ssl_verify)
Ejemplo n.º 2
0
 def test_with_tag_branch_option(self):
     expected = "dev"
     options = get_options([
         'fetch', '--auth-token', 'someToken', '--repository',
         'pygithubctl', '--owner', 'sarathkumarsivan', '--branch', 'dev',
         '--tag', 'release-1.0', '--path', 'README.rst', '--type', 'file',
         '--destination', '/tmp', '--http-ssl-verify', 'True'
     ])
     actual = get_branch_or_tag(options)
     self.assertEqual(actual, expected)