OWASP / pysap

pysap is an open source Python library that provides modules for crafting and sending packets using SAP's NI, Diag, Enqueue, Router, MS, SNC, IGS, RFC and HDB protocols.
https://owasp.org/www-project-core-business-application-security/
GNU General Public License v2.0
220 stars 61 forks source link

Port pysapcar tool to be Python 2/3 compatible #30

Closed okuuva closed 6 years ago

okuuva commented 6 years ago

Quite a lot of refactoring in this one. CLI tool was more or less compatible already, but without unit tests available it was hard to be sure. In order to make it testable, had to move logic under pysap module and minimize the CLI script. Utilized mock and testfixtures modules in CLI testing, which meant adding new requirements file for tests. Overhauled unit test naming to follow Python naming convention while I was at it. Resolves #29.

okuuva commented 6 years ago

Ok, unit test coverage for CLI is now ~70%. Didn't write tests for parse_options as I trust ArgumentParser has been tested by Python community quite extensively, nor for main as it just calls methods based on parsed options. All "functional" parts are more or less fully covered.

martingalloar commented 6 years ago

Thanks @okuuva and apologize for the long wait to get this merged!