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

Unified Diff: tests/cli/image_export_tool.py

Issue 321000043: [plaso] Refactored log2timeline front-end to tool #160 (Closed)
Patch Set: Updated review script Created 6 years, 10 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
Index: tests/cli/image_export_tool.py
diff --git a/tools/image_export_test.py b/tests/cli/image_export_tool.py
similarity index 74%
rename from tools/image_export_test.py
rename to tests/cli/image_export_tool.py
index 8b50956a0a7ffa9962e4e69462bd4aa5c0dec7d0..7fb7bfd691696f2fa48ee53ecd87d2f3e72d7215 100644
--- a/tools/image_export_test.py
+++ b/tests/cli/image_export_tool.py
@@ -4,23 +4,22 @@
import unittest
+from plaso.cli import image_export_tool
from plaso.lib import errors
from tests import test_lib as shared_test_lib
-from tests.cli import test_lib as cli_test_lib
+from tests.cli import test_lib as test_lib
-from tools import image_export
-
-class ImageExportToolTest(cli_test_lib.CLIToolTestCase):
+class ImageExportToolTest(test_lib.CLIToolTestCase):
"""Tests for the image export CLI tool."""
# pylint: disable=protected-access
def testListSignatureIdentifiers(self):
"""Tests the ListSignatureIdentifiers function."""
- output_writer = cli_test_lib.TestOutputWriter(encoding=u'utf-8')
- test_tool = image_export.ImageExportTool(output_writer=output_writer)
+ output_writer = test_lib.TestOutputWriter(encoding=u'utf-8')
+ test_tool = image_export_tool.ImageExportTool(output_writer=output_writer)
test_tool._data_location = self._TEST_DATA_PATH
@@ -48,8 +47,8 @@ class ImageExportToolTest(cli_test_lib.CLIToolTestCase):
def testParseArguments(self):
"""Tests the ParseArguments function."""
- output_writer = cli_test_lib.TestOutputWriter(encoding=u'utf-8')
- test_tool = image_export.ImageExportTool(output_writer=output_writer)
+ output_writer = test_lib.TestOutputWriter(encoding=u'utf-8')
+ test_tool = image_export_tool.ImageExportTool(output_writer=output_writer)
result = test_tool.ParseArguments()
self.assertFalse(result)
@@ -59,15 +58,15 @@ class ImageExportToolTest(cli_test_lib.CLIToolTestCase):
def testParseOptions(self):
"""Tests the ParseOptions function."""
- output_writer = cli_test_lib.TestOutputWriter(encoding=u'utf-8')
- test_tool = image_export.ImageExportTool(output_writer=output_writer)
+ output_writer = test_lib.TestOutputWriter(encoding=u'utf-8')
+ test_tool = image_export_tool.ImageExportTool(output_writer=output_writer)
- options = cli_test_lib.TestOptions()
+ options = test_lib.TestOptions()
options.image = self._GetTestFilePath([u'image.qcow2'])
test_tool.ParseOptions(options)
- options = cli_test_lib.TestOptions()
+ options = test_lib.TestOptions()
with self.assertRaises(errors.BadConfigOption):
test_tool.ParseOptions(options)
@@ -78,10 +77,10 @@ class ImageExportToolTest(cli_test_lib.CLIToolTestCase):
def testProcessSourcesImage(self):
"""Tests the ProcessSources function on a single partition image."""
- output_writer = cli_test_lib.TestOutputWriter(encoding=u'utf-8')
- test_tool = image_export.ImageExportTool(output_writer=output_writer)
+ output_writer = test_lib.TestOutputWriter(encoding=u'utf-8')
+ test_tool = image_export_tool.ImageExportTool(output_writer=output_writer)
- options = cli_test_lib.TestOptions()
+ options = test_lib.TestOptions()
options.image = self._GetTestFilePath([u'ímynd.dd'])
options.quiet = True

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