Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(115)

Unified Diff: tests/cli/analysis_tool.py

Issue 326740043: [plaso] Refactored options to CLI helpers #160 (Closed)
Patch Set: Changes after review and merge Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/analysis/manager.py ('k') | tests/cli/extract_analyze_tool.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/cli/analysis_tool.py
diff --git a/tests/cli/analysis_tool.py b/tests/cli/analysis_tool.py
deleted file mode 100644
index d71a42c42f227dfcea9843a1a4a3e2aeff8e6a63..0000000000000000000000000000000000000000
--- a/tests/cli/analysis_tool.py
+++ /dev/null
@@ -1,57 +0,0 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-"""Tests for the analysis tool object."""
-
-import argparse
-import unittest
-
-from plaso.cli import analysis_tool
-from plaso.lib import errors
-
-from tests import test_lib as shared_test_lib
-from tests.cli import test_lib
-
-
-class StorageMediaToolTest(test_lib.CLIToolTestCase):
- """Tests for the analysis tool object."""
-
- _EXPECTED_OUTPUT_STORAGE_FILE_OPTIONS = u'\n'.join([
- u'usage: analysis_tool_test.py [STORAGE_FILE]',
- u'',
- u'Test argument parser.',
- u'',
- u'positional arguments:',
- u' STORAGE_FILE The path of the storage file.',
- u''])
-
- def testAddStorageFileOptions(self):
- """Tests the AddStorageFileOptions function."""
- argument_parser = argparse.ArgumentParser(
- prog=u'analysis_tool_test.py', description=u'Test argument parser.',
- add_help=False, formatter_class=test_lib.SortedArgumentsHelpFormatter)
-
- test_tool = analysis_tool.AnalysisTool()
- test_tool.AddStorageFileOptions(argument_parser)
-
- output = self._RunArgparseFormatHelp(argument_parser)
- self.assertEqual(output, self._EXPECTED_OUTPUT_STORAGE_FILE_OPTIONS)
-
- @shared_test_lib.skipUnlessHasTestFile([u'psort_test.json.plaso'])
- def testParseOptions(self):
- """Tests the ParseOptions function."""
- test_tool = analysis_tool.AnalysisTool()
-
- options = test_lib.TestOptions()
-
- with self.assertRaises(errors.BadConfigOption):
- test_tool.ParseOptions(options)
-
- options.storage_file = self._GetTestFilePath([u'psort_test.json.plaso'])
-
- test_tool.ParseOptions(options)
-
- # TODO: improve this test.
-
-
-if __name__ == '__main__':
- unittest.main()
« no previous file with comments | « tests/analysis/manager.py ('k') | tests/cli/extract_analyze_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b