diff options
author | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-19 17:10:08 +0200 |
---|---|---|
committer | Gauvain Pocentek <gauvain@pocentek.net> | 2018-05-19 17:10:08 +0200 |
commit | fe89b949922c028830dd49095432ba627d330186 (patch) | |
tree | aa14611d11c550a790d7976f2b24fabb77e81a67 /gitlab/tests/test_cli.py | |
parent | 701169441194bf0441cee13f2ab5784ffad7a207 (diff) | |
download | gitlab-fe89b949922c028830dd49095432ba627d330186.tar.gz |
Drop API v3 support
Drop the code, the tests, and update the documentation.
Diffstat (limited to 'gitlab/tests/test_cli.py')
-rw-r--r-- | gitlab/tests/test_cli.py | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/gitlab/tests/test_cli.py b/gitlab/tests/test_cli.py index a39ef96..034beed 100644 --- a/gitlab/tests/test_cli.py +++ b/gitlab/tests/test_cli.py @@ -23,14 +23,12 @@ import argparse import os import tempfile -import six try: import unittest except ImportError: import unittest2 as unittest from gitlab import cli -import gitlab.v3.cli import gitlab.v4.cli @@ -121,44 +119,3 @@ class TestV4CLI(unittest.TestCase): actions = user_subparsers.choices['create']._option_string_actions self.assertFalse(actions['--description'].required) self.assertTrue(actions['--name'].required) - - -class TestV3CLI(unittest.TestCase): - def test_parse_args(self): - parser = cli._get_parser(gitlab.v3.cli) - args = parser.parse_args(['project', 'list']) - self.assertEqual(args.what, 'project') - self.assertEqual(args.action, 'list') - - def test_parser(self): - parser = cli._get_parser(gitlab.v3.cli) - subparsers = None - for action in parser._actions: - if type(action) == argparse._SubParsersAction: - subparsers = action - break - self.assertIsNotNone(subparsers) - self.assertIn('user', subparsers.choices) - - user_subparsers = None - for action in subparsers.choices['user']._actions: - if type(action) == argparse._SubParsersAction: - user_subparsers = action - break - self.assertIsNotNone(user_subparsers) - self.assertIn('list', user_subparsers.choices) - self.assertIn('get', user_subparsers.choices) - self.assertIn('delete', user_subparsers.choices) - self.assertIn('update', user_subparsers.choices) - self.assertIn('create', user_subparsers.choices) - self.assertIn('block', user_subparsers.choices) - self.assertIn('unblock', user_subparsers.choices) - - actions = user_subparsers.choices['create']._option_string_actions - self.assertFalse(actions['--twitter'].required) - self.assertTrue(actions['--username'].required) - - def test_extra_actions(self): - for cls, data in six.iteritems(gitlab.v3.cli.EXTRA_ACTIONS): - for key in data: - self.assertIsInstance(data[key], dict) |