strongswan / swidGenerator

Application which generates SWID-Tags from Linux package managers like dpkg, rpm or pacman.
MIT License
16 stars 11 forks source link

tests with mocking #20

Closed cfaessler closed 10 years ago

cfaessler commented 10 years ago

@dbrgn can you please review as discussed. thx.

dbrgn commented 10 years ago

I'd recommend converting test_SwidGenerator and test_SwidGeneratorParser to under_scored variants for consistency reasons.

What exactly is the difference between samples and dumps? Also, I find the naming for all the text files very confusing. I could never tell what the content is just by looking at the name. Maybe subfolders (like softwareids, directory_listings, swid_tags etc) would help?

I'd try to organize the rpm_fixtures.py file a bit better, by grouping them and adding comments (I always use ### Foo Bar ### on a single line to divide functions of different groups). Examples could be Helper Functions, Environment Fixtures or XML Fixtures.

Also, maybe it would make sense to create a fixtures package and move rpm_fixtures.py to fixtures/rpm_environment.py. (Don't forget the __init__.py file.)

Btw, minimock rocks! :)

cfaessler commented 10 years ago

@dbrgn implemented the suggested changes

dbrgn commented 10 years ago

Besides that issue above, I think this is ready to rebase & merge! :)

Dump file organization is much better now.