summaryrefslogtreecommitdiffstats
path: root/tests/file_test.py
Commit message (Collapse)AuthorAgeFilesLines
* tests/file_test.py: corrected typo in the docstring of test_cbpath method.Siddharth Ravikumar2015-02-251-1/+1
|
* new function combox.file.node_path.Siddharth Ravikumar2015-02-251-0/+19
| | | | | | | | | | | | | This function takes the path to the file in the combox and returns the path of its first shard in the node directory. If the the given argument is a directory (inside the combox directory), the function returns the corresponding path of the directory under the first node directory. Test for the function was also written. modified: combox/file.py modified: tests/file_test.py
* Refactored combox.file.cb_path to accept a file or a directory under a node ↵Siddharth Ravikumar2015-02-201-1/+8
| | | | | | | | | | | directory. It returns the path of the respective file or directory in the combox directory. Also updated the test for this function at tests.file_test.TestFile.test_cbpath modified: combox/file.py modified: tests/file_test.py
* Defined new function in combox.file.cb_pathSiddharth Ravikumar2015-02-191-0/+10
| | | | | | | | | | This function, given the path of a file shard, returns the corresponding path of the file in the combox directory. The test for this function is at tests.file_test.TestFile.test_cbpath modified: combox/file.py modified: tests/file_test.py
* tests/file_test.py: in test_relativepath method path.join is used to ↵Siddharth Ravikumar2015-02-191-3/+2
| | | | construct pathnames.
* modded combox.file.relative_path function.Siddharth Ravikumar2015-02-191-3/+21
| | | | | | | | | | Now the function is rigged up to return path relative to both combox directory and node directory. Corresponding test for this function is at tests.file_test module. modified: combox/file.py modified: tests/file_test.py
* All the test classes now call rm_configdir() in their teardown method.Siddharth Ravikumar2015-02-181-1/+2
| | | | | | | | modified: tests/config_test.py modified: tests/crypto_test.py modified: tests/events_test.py modified: tests/file_test.py modified: tests/silo_test.py
* All the tests now remove the node directories (tests/shard-dir-0 & ↵Siddharth Ravikumar2015-02-131-1/+2
| | | | | | | | | | | | | tests/shard-dir-1) in the teardown method. modified: tests/config_test.py modified: tests/crypto_test.py modified: tests/events_test.py modified: tests/file_test.py modified: tests/silo_test.py deleted: tests/shard-dir-0/.foo deleted: tests/shard-dir-1/.foo
* tests/crypto_test.py & tests/file_test.py - corrected typos in doctstrings.Siddharth Ravikumar2015-02-131-1/+1
|
* tests/file_test.py: re-wrote it.Siddharth Ravikumar2015-02-111-48/+54
| | | | Now the test is in a Test class with proper setup and teardown methods.
* combox/file.py: defined hash_file function.Siddharth Ravikumar2015-01-211-1/+13
| | | | | | hash_file function returns the SHA512 hash of the file's content. The test for the hash_file function is at tests/file_test.py
* updated copright year.Siddharth Ravikumar2015-01-201-1/+1
| | | | | | | | | | | | modified: combox/cbox.py modified: combox/config.py modified: combox/crypto.py modified: combox/events.py modified: combox/file.py modified: tests/config_test.py modified: tests/crypto_test.py modified: tests/events_test.py modified: tests/file_test.py
* tests/file_test.py: uses get_nodedirs function to fetch list of node ↵Siddharth Ravikumar2015-01-131-1/+2
| | | | directories.
* rewrote the read_shards() and write_shards() function in combox/file.py.Siddharth Ravikumar2015-01-131-12/+23
| | | | | | | | | Tests were accordingly modded and now use the test config.yaml to split and write shards to dirs. modified: combox/file.py modified: tests/crypto_test.py modified: tests/file_test.py
* Added `nose' for combox/config.py, combox/crypto.py, combox/file.pySiddharth Ravikumar2015-01-121-0/+72
new file: tests/config_test.py new file: tests/crypto_test.py new file: tests/file_test.py