Commit Graph

51 Commits (0038d3ef66a3ea9634848e86de38a52c36d274e1)

Author SHA1 Message Date
Dan Puttick 0038d3ef66 Switch to using file properties
* make_dangerous now takes a description string
* add_file_string takes strings describing the file
2017-03-15 21:06:07 -04:00
Dan Puttick fc8923fddd Change Groomer private methods to public
* Changed safe_rmtree, safe_copy, safe_remove, and safe_mkdir to public methods
* If something is being used in a subclass it probably shouldn't be a private
method
2017-03-15 21:06:07 -04:00
Dan Puttick 12d5624b4d Change FileBase.log_details to Filebase._file_props
* _file_props is a dict that will hold all information about the file
* Updated filecheck.py to reflect this
* Potentially will change contents of file_props to being attributes on the
file in the future. This change would be easy since all access to _file_props
is now via set_property and get_property methods.
* Add filename to _file_props
2017-03-15 21:06:06 -04:00
Dan Puttick 1c58a7347e If no extentions FileBase.ext is now None 2017-03-15 21:06:06 -04:00
Dan Puttick 3d36c90d66 Make list_all_files a public method 2017-03-15 21:04:57 -04:00
Dan Puttick c6ecc5e3a3 Fix process_dir bug in filecheck tests 2017-03-15 21:04:57 -04:00
Dan Puttick 61aa14c98d Change _write_log to _print_log 2017-03-15 21:04:57 -04:00
Dan Puttick 9d2f5c7241 Add .jpg test file, testfile_directory.md
- Also fixed a bug with metadata code
2017-03-15 21:04:57 -04:00
Dan Puttick 7d62238270 Hacks to make tests pass before fixing 2017-03-15 21:04:57 -04:00
Dan Puttick 1cf8a62f46 First commit with Logger object
- Made logger object
- Moved some logger related code from Groomer to Logger
- Changed logging related tests
- Filecheck tests still do not pass
2017-03-15 21:04:57 -04:00
Dan Puttick 92d1b1cd93 Refactor metadata processing code 2017-03-15 21:01:28 -04:00
Dan Puttick 833ade6008 Change to Python 3 compatible only 2017-01-19 17:06:34 -05:00
Dan Puttick 3b1df108d5 Rename test_helpers 2017-01-19 16:19:15 -05:00
Dan Puttick faf534c66f Add test.obj to src_invalid 2017-01-19 16:12:32 -05:00
Dan Puttick 21cc175867 Move non-filecheck.py binaries into examples directory
Tests for these scripts also removed from /tests and from .travis.yml
Two .zip archives accidentally deleted from /tests/src_invalid, re-added them
and changed .gitignore to prevent the problem
2017-01-19 15:25:08 -05:00
Dan Puttick d4bfe794be In FileBase, self.extension is now always lowercase 2017-01-18 15:51:54 -05:00
Dan Puttick 43c01e0f05 Add example autorun.inf file to tests/src_invalid 2017-01-18 15:51:54 -05:00
Dan Puttick 3dad4faa61 Reorganize tests making them easier to run
- The tests now automatically run depending on whether you have the dependencies
installed, instead of failing and throwing exceptions.
- CONTRIBUTING.md has more information on how to run the tests.
- When the tests run, they will save their logs to /test_logs instead
of printing them so you can read them later.
- Change names of source file directories to make them more descriptive
2017-01-18 15:51:54 -05:00
Dan Puttick 35501b69af Create test_filecheck.py 2017-01-18 15:51:47 -05:00
Dan Puttick cef4223c53 Deleting old tests, minor test reorganization. 2016-12-16 17:36:21 -05:00
Dan Puttick cb4ae5deec Changing travis and tests to run filecheck in Python 3 2016-12-16 16:07:43 -05:00
Dan Puttick 0364e038e1 Added unit tests for KittenGroomerBase 2016-12-14 15:44:59 -05:00
Dan Puttick 196a9fcac1 Added unit tests for FileBase 2016-12-12 17:03:44 -05:00
Dan Puttick 52f56581d1 Skeleton of unit tests using pytest 2016-12-12 17:03:44 -05:00
Dan Puttick dc9c864e23 Removed __init__ from . and changed imports in tests
Python import system can be tricky, but I think that not having __init__ in
the main directory here is better. We'll have to make sure it doesn't break
anything.
2016-12-07 13:19:45 -05:00
Dan Puttick 67e825046d Added fixtures for source and dest in test_examples 2016-12-07 13:19:26 -05:00
Dan Puttick 516b14ca10 Renamed test src directories for clarity 2016-12-07 13:19:26 -05:00
Dan Puttick fdf8fae065 Created test_examples.py
Decided that it makes sense to test example code seperately from module code.
At some point might move these tests in with the example code, but for now am
keeping them seperate and simple.
2016-12-07 13:18:28 -05:00
Dan Puttick b450abbaaa Setting up pytest 2016-12-07 13:17:16 -05:00
Raphaël Vinot c4af907345 Add model/* example 2016-05-17 11:44:01 +02:00
Raphaël Vinot b9e38bfa3f Add message/* mimetype file 2016-05-17 11:15:38 +02:00
Raphaël Vinot 6154c3748d Add valid symlink 2016-05-17 11:11:24 +02:00
Raphaël Vinot a4b045030c Add testfile for symlinks 2016-05-16 20:24:25 +02:00
Raphaël Vinot 580385d0d9 Add zipbomb in the test script 2016-05-16 11:25:01 +02:00
Raphaël Vinot abb565094c Fix py3 support 2016-05-10 17:16:04 +02:00
Raphaël Vinot aaad11b5c1 Test plenty of doc & docx files 2016-02-01 11:45:50 +01:00
Raphaël Vinot df80af000c Run generic script on more docs 2016-02-01 11:26:33 +01:00
Raphaël Vinot 2dd0520964 Fix tests for python2.7 2016-01-29 10:51:43 +01:00
Raphaël Vinot 315e9590b8 Use smaller test suite on the converting script 2015-11-05 17:37:01 +01:00
Raphaël Vinot 531ab43dae Improve debug, add list of malicious ext 2015-11-05 00:10:30 +01:00
Raphaël Vinot 975ed03e38 Print logs after each tests. 2015-11-03 18:26:12 +01:00
Raphaël Vinot 25279e6b57 Fix deps 2015-11-03 11:54:38 +01:00
Raphaël Vinot d1f1c4fe16 Add new file to travis 2015-11-03 11:12:29 +01:00
Raphaël Vinot af10e8f1ec Add Zip 2015-10-27 17:15:14 +01:00
Raphaël Vinot f7f7e3860a Even more tests 2015-10-27 16:51:03 +01:00
Raphaël Vinot 5ccae98404 Fix tests 2015-10-27 14:53:33 +01:00
Raphaël Vinot 25b11192bb Add more tests 2015-10-27 14:37:51 +01:00
Raphaël Vinot 4fedb2efe4 Add tests for FileBase 2015-10-27 14:16:33 +01:00
Raphaël Vinot 5cecd6625c Add more tests 2015-10-27 10:50:46 +01:00
Raphaël Vinot 74fe05cbe1 Do not use subprocess. 2015-10-27 10:24:45 +01:00