Commit graph

2 commits

Author SHA1 Message Date
Dominik Pataky 7ae179cb33 Reformat data flow attributes and unpacking; adapt tests
The V1DataFlow and V5DataFlow classes used a verbose way of unpacking
the hex byte stream to the specific fields until now. With this commit,
both use a list of field names, one struct.unpack call and then a
mapping for-loop for each field.

Additionally the upper boundary of the passed data slice was added.

With the self.__dict__.update() call all fields are now also accessible
as direct attributes of the corresponding instance, e.g. flow.PROTO to
access flow.data["PROTO"]. This works for flows of all three versions.

The tests were adapted to reflect this new implementation.
2020-03-30 12:29:50 +02:00
Dominik Pataky 5765fa31cf Rename test file; fix analyzer test
Tests are now all running, not skipping the analyzer test.
Adapted to the new CLI calling method for the subprocess.
2020-03-29 22:33:26 +02:00
Renamed from tests.py (Browse further)