def test_create_argument_parser_with_purge_own_project(self): parser = main.create_argument_parser() options = parser.parse_args(['--purge-own-project']) self.assertEqual(False, options.verbose) self.assertEqual(False, options.dry_run) self.assertEqual(False, options.delete_shared_resources) self.assertEqual(True, options.purge_own_project)
def test_create_argument_parser_with_resource(self): parser = main.create_argument_parser() self.assertIsInstance(parser, argparse.ArgumentParser) options = parser.parse_args([ '--resource', 'Networks', '--purge-project', 'foo', '--resource', 'Volumes' ]) self.assertEqual('foo', options.purge_project) self.assertEqual(['Networks', 'Volumes'], options.resource)
def test_create_argument_parser_with_purge_project(self): parser = main.create_argument_parser() self.assertIsInstance(parser, argparse.ArgumentParser) options = parser.parse_args([ '--verbose', '--dry-run', '--purge-project', 'foo', '--delete-shared-resources' ]) self.assertEqual(True, options.verbose) self.assertEqual(True, options.dry_run) self.assertEqual(True, options.delete_shared_resources) self.assertEqual('foo', options.purge_project)