Package rekall :: Package plugins :: Package tools :: Module json_test :: Class JsonTest
[frames] | no frames]

Class JsonTest

source code


Test the Json encode/decoder.

Nested Classes
  __metaclass__
Automatic Plugin Registration through metaclasses. (Inherited from rekall.testlib.RekallBaseUnitTestCase)
  top_level_class
Base class for all rekall unit tests. (Inherited from rekall.testlib.RekallBaseUnitTestCase)

Inherited from unittest.case.TestCase: failureException

Instance Methods
 
setUp(self)
Hook method for setting up the test fixture before exercising it.
source code
 
testEncoderCache(self) source code
 
testObjectRenderer(self) source code
 
testProperSerialization(self)
Test that serializing simple python objects with json works.
source code
 
testObjectSerization(self)
Serialize _EPROCESS objects.
source code
 
testAllObjectSerialization(self) source code
 
CheckObjectSerization(self, obj) source code
 
BuildBaselineData(self, config_options) (Inherited from rekall.testlib.RekallBaseUnitTestCase) source code
 
LaunchExecutable(self, config_options)
Launches the rekall executable with the config specified. (Inherited from rekall.testlib.RekallBaseUnitTestCase)
source code
 
MakeUserSession(self, config_options=None) (Inherited from rekall.testlib.RekallBaseUnitTestCase) source code
 
__init__(self, method_name='__init__', baseline=None, current=None, debug=False, temp_directory=None, config_options=None)
Create an instance of the class that will use the named test method when executed. (Inherited from rekall.testlib.RekallBaseUnitTestCase)
source code
 
__unicode__(self) (Inherited from rekall.testlib.RekallBaseUnitTestCase) source code
 
assertListEqual(self, a, b, msg=None)
A list-specific equality assertion. (Inherited from rekall.testlib.RekallBaseUnitTestCase)
source code
 
run(self, result=None) (Inherited from rekall.testlib.RekallBaseUnitTestCase) source code

Inherited from unittest.case.TestCase: __call__, __eq__, __hash__, __ne__, __repr__, __str__, addCleanup, addTypeEqualityFunc, assertAlmostEqual, assertAlmostEquals, assertDictContainsSubset, assertDictEqual, assertEqual, assertEquals, assertFalse, assertGreater, assertGreaterEqual, assertIn, assertIs, assertIsInstance, assertIsNone, assertIsNot, assertIsNotNone, assertItemsEqual, assertLess, assertLessEqual, assertMultiLineEqual, assertNotAlmostEqual, assertNotAlmostEquals, assertNotEqual, assertNotEquals, assertNotIn, assertNotIsInstance, assertNotRegexpMatches, assertRaises, assertRaisesRegexp, assertRegexpMatches, assertSequenceEqual, assertSetEqual, assertTrue, assertTupleEqual, assert_, countTestCases, debug, defaultTestResult, doCleanups, fail, failIf, failIfAlmostEqual, failIfEqual, failUnless, failUnlessAlmostEqual, failUnlessEqual, failUnlessRaises, id, shortDescription, skipTest, tearDown

Inherited from object: __delattr__, __format__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Class Methods
 
CommandName(cls) (Inherited from rekall.testlib.RekallBaseUnitTestCase) source code
 
ImplementationByClass(self, name) source code
 
ImplementationByName(self, name) source code
 
is_active(cls, _) (Inherited from rekall.testlib.RekallBaseUnitTestCase) source code
 
setUpClass(cls)
Hook method for setting up class fixture before running tests in the class. (Inherited from rekall.testlib.RekallBaseUnitTestCase)
source code
 
tearDownClass(cls)
Hook method for deconstructing the class fixture after running all tests in the class. (Inherited from rekall.testlib.RekallBaseUnitTestCase)
source code
Class Variables
  PLUGIN = 'json_render'
hash(x)
  PARAMETERS = {'commandline': ''} (Inherited from rekall.testlib.RekallBaseUnitTestCase)
  classes = {'BuildSymbolOffsetIndexTest': <class 'rekall.plugin... (Inherited from rekall.testlib.RekallBaseUnitTestCase)
  classes_by_name = {None: [<class 'rekall.testlib.InlineTest'>,... (Inherited from rekall.testlib.RekallBaseUnitTestCase)
  disabled = False (Inherited from rekall.testlib.RekallBaseUnitTestCase)
  plugin_feature = 'RekallBaseUnitTestCase' (Inherited from rekall.testlib.RekallBaseUnitTestCase)
  temp_directory = None
hash(x) (Inherited from rekall.testlib.RekallBaseUnitTestCase)

Inherited from unittest.case.TestCase: longMessage, maxDiff

Properties

Inherited from object: __class__

Method Details

setUp(self)

source code 

Hook method for setting up the test fixture before exercising it.

Overrides: unittest.case.TestCase.setUp
(inherited documentation)

testProperSerialization(self)

source code 
Test that serializing simple python objects with json works.

NOTE: Json is not intrinsically a fully functional serialization format
- it is unable to serialize many common python primitives (e.g. strings,
dicts with numeric keys etc). This tests that our wrapping around the
json format allows the correct serialization of python primitives.

testObjectSerization(self)

source code 

Serialize _EPROCESS objects.

We check that the deserialized object is an exact replica of the original - this includes the same address spaces, profile and offset.

Having the objects identical allows us to dereference object members seamlessly.

ImplementationByClass(self, name)
Class Method

source code 
Overrides: testlib.RekallBaseUnitTestCase.ImplementationByClass

ImplementationByName(self, name)
Class Method

source code 
Overrides: testlib.RekallBaseUnitTestCase.ImplementationByName