summaryrefslogtreecommitdiffstats
path: root/tests/events_test.py
Commit message (Collapse)AuthorAgeFilesLines
* .py files coding set to utf-8.Siddharth Ravikumar2015-12-221-0/+2
|
* Now ComboxDirMonitor uses Lock. Addresses bug#11.Siddharth Ravikumar2015-11-191-18/+18
|
* Updated combox.events.ComboxDirMonitor and combox.events.NodeDirMonitor. See ↵rsiddharth2015-11-081-19/+20
| | | | | | ChangeLog. Changes related to bug#10.
* [bug fix] fix for :b#2:Siddharth Ravikumar2015-09-291-1/+14
| | | | | | | | | Now combox ignores tmp files created by editors. modified: TODO.org modified: combox/events.py modified: tests/events_test.py modified: tests/utils.py
* ests.events_test: updated TestEvents's teardown_class method.Siddharth Ravikumar2015-09-061-2/+2
|
* Wrote a fix for Google Drive client behavior for file modification.Siddharth Ravikumar2015-09-061-6/+98
| | | | | | | | | | The unit test that simulates the behavior of Google Drive for file modification runs successfully, but I need to test this fix, with the Google Drive client monitoring a node directory, to confirm if the fix actually works. modified: combox/events.py modified: tests/events_test.py
* Updated combox.events.NodeDirMonitor.housekeep's 're-construct file' ↵Siddharth Ravikumar2015-05-011-0/+30
| | | | | | | | | | | | | | | | | | | | functionality. - Now the housekeep method re-contructs the files, whose shards were created when combox was off, in the combox directory only if all of its shards have made it to the respective node directories. - If it finds only some of all the shards of a file missing, it stores this information in the `file_created' dict inside the silo. - tests.events_tests.TestEvents.test_NDM_housekeep_create tests the 're-construct file' functionality of combox.events.NodeDirMonitor.housekeep method. modified: combox/events.py modified: tests/events_test.py
* Updated combox.events.NodeDirMonitor.housekeep's delete functionality.Siddharth Ravikumar2015-04-301-2/+29
| | | | | | | | | | | | | | | | | | - Now the housekeep method deletes the file in the combox directory only if all of its shards are missing in the respective node directories -- meaning it was deleted on another computer (running combox). - If it finds only some of all the shards of a file missing, it stores this information in the `file_deleted' dict inside the silo. - tests.events_tests.TestEvents.test_NDM_housekeep_delete tests the delete functionality of combox.events.NodeDirMonitor.housekeep method. modified: combox/events.py modified: tests/events_test.py
* rewrote combox.events.NodeDirMonitor.on_moved method.Siddharth Ravikumar2015-04-221-11/+31
| | | | | | | | | | | | | - Now the node monitor waits for all shards of the file, which was moved/renamed on a remote computer, to get moved/renamed on this computer, before it finally reconstructs the moved/renamed file in the combox directory on this computer. - Updated the tests for on_moved method at tests.events_test.TestEvents.test_NDM_onmoved method. modified: combox/events.py modified: tests/events_test.py
* rewrote combox.events.NodeDirMonitor.on_deleted method.Siddharth Ravikumar2015-04-151-0/+55
| | | | | | | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was deleted on a remote computer, to get deleted on this computer, before it finally deletes the respective file in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_ondeleted method. modified: combox/events.py modified: tests/events_test.py Did some of this while listening to Cat Stevens' (Yusuf): - Just Another Night - Wild World - Father and son (*) - Peace train - Moonshadow (*)
* rewrote combox.events.NodeDirMonitor.on_modified method.Siddharth Ravikumar2015-04-081-0/+58
| | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was modified on a remote computer, to arrive on this computer, before it re-constructs the file into the respective location in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_onmodified method. modified: combox/events.py modified: tests/events_test.py Part of this was done while listening to Avril's "Complicated" ; I think this is the only modern Pop song which I like.
* After a file which was created a in a remote computer is reconstructed in ↵Siddharth Ravikumar2015-04-081-1/+6
| | | | | | | this computer, its info is removed from the 'file_created' dictionary in the silo. modified: combox/events.py modified: tests/events_test.py
* added test file to purge list in tests.events_test.TestEvents.test_NDM_oncreatedSiddharth Ravikumar2015-04-081-0/+3
| | | | modified: tests/events_test.py
* Added test for directory creation in ↵Siddharth Ravikumar2015-04-081-15/+15
| | | | | | tests.events_test.TestEvents.test_NDM_oncreated. modified: tests/events_test.py
* renamed method test_NDM_oncreate -> test_NDM_oncreated in ↵Siddharth Ravikumar2015-04-081-2/+2
| | | | | | tests.event_test.TestEvents. modified: tests/events_test.py
* modded teardown method in tests.events_test.TestEvents.Siddharth Ravikumar2015-04-031-6/+2
| | | | | | the silo is purged using the deldb method instead of doing a os.remove. modfied: tests/events_test.py
* [golden commit]: rewrote combox.events.NodeDirMonitor.on_created method.Siddharth Ravikumar2015-04-011-8/+59
| | | | | | | | | | | | | | | | | | | | | - Now the the node monitor waits for all shards of the file, which was created on a remote computer, to arrive on this computer, before it re-constructs the file into the respective location in the combox directory. - Tests for it is at tests.events_test.TestEvents.test_NDM_oncreate method. - The main test method, tests.events_test.TestEvents.test_NDM, was disabled by renaming it to tests.events_test.TestEvents.test_NDM. - Now the NodeDirMonitor requires passing the 'node monitor lock' when creating an instance of it. :~( modified: combox/events.py modified: tests/events_test.py
* new variable at NodeDirMonitor -- `num_nodes'Siddharth Ravikumar2015-04-011-0/+9
| | | | | | | `num_nodes' a value that represents the number of node directories. modified: combox/events.py modified: tests/events_test.py
* refactored the way locks work in combox.siloComboxSilo.Siddharth Ravikumar2015-04-011-31/+33
| | | | | | | | modified: combox/cbox.py modified: combox/events.py modified: combox/silo.py modified: tests/events_test.py modified: tests/silo_test.py
* fleshed out combox.events.NodDirMonitor.housekeep method.Siddharth Ravikumar2015-03-261-2/+71
| | | | | | | wrote tests for it too :~( modified: combox/events.py modified: tests/events_test.py
* In tests, the code that purges the files/directories in `purge_list' is now ↵Siddharth Ravikumar2015-03-191-7/+2
| | | | | | | | a function. modified: tests/events_test.py modified: tests/file_test.py modified: tests/utils.py
* fleshed out the on_move method in combox.events.NodeDirMonitorSiddharth Ravikumar2015-03-181-2/+61
| | | | | | | As usual, wrote correponding tests for it; zarking TDD or whatever :~| modified: combox/events.py modified: tests/events_test.py
* tests/events_test.py: paths in `purge_list' is purged after executing each ↵Siddharth Ravikumar2015-03-181-7/+8
| | | | test method.
* Added `shardp' method to combox.events.NodeDirMonitor + test for it.Siddharth Ravikumar2015-03-131-0/+10
| | | | | modified: combox/events.py modified: tests/events_test.py
* all the sleep calls are 1 sec long in tests.events_testSiddharth Ravikumar2015-03-041-5/+5
|
* fleshed out the on_delete method in combox.events.NodeDirMonitorSiddharth Ravikumar2015-03-041-2/+15
| | | | | | | As usual, wrote correponding tests for it :| modified: combox/events.py modified: tests/events_test.py
* fleshed out the NodeDirMonitor's on_modified method + wrote tests for it.Siddharth Ravikumar2015-02-261-0/+34
| | | | | modified: combox/events.py modified: tests/events_test.py
* New combox.events.NodeDirMonitor class defined.Siddharth Ravikumar2015-02-201-6/+58
| | | | | | | | | | At the moment only the on_created method of this class is kinda fleshed out. The tests for this class is at tests.events_test.TestEvents.test_NDM modified: combox/events.py modified: tests/events_test.py
* modded tests/events_test.TestEvents.teardown methodSiddharth Ravikumar2015-02-201-1/+3
| | | | This method now checks if the `silo.db' exists before deleting it.
* combox/events.py: now the silo.db is purged after every test method in ↵Siddharth Ravikumar2015-02-191-7/+2
| | | | EventsTest class.
* tests/events_test.py: defined teardown method in TestEvents class.Siddharth Ravikumar2015-02-191-1/+7
| | | | | - The teardown method is invoked after the end of each test in the TestEvents class. - At the moment the teardown method just purges the node directories.
* 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/+3
| | | | | | | | | | | | | 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/events_test.py: now teardown purges the shards of TEST_FILESiddharth Ravikumar2015-02-131-0/+2
|
* tests/events_test.py: corrected typo in docstring.Siddharth Ravikumar2015-02-131-1/+1
|
* tests/events_test.py: re-wrote itSiddharth Ravikumar2015-02-121-237/+187
| | | | | | | - Now the test is in a Test class with proper setup and teardown methods. - Utility functions were removed; these utility function were added to tests/utils.py module (see previous commit).
* tests/events_test.py: wrote test for 'file modification' under test_housekeep()Siddharth Ravikumar2015-01-281-0/+28
| | | | This, I guess, completes the tests for the new housekeep method in the ComboxDirMonitor class.
* combox/events.py - Wrote first version of housingkeep() method for ↵Siddharth Ravikumar2015-01-271-1/+23
| | | | | | | ComboxDirMonitor class. The test for this method at tests/events_test.py only tests a part of it.
* tests/events_test.py: renamed test_CEH() -> test_CDM()Siddharth Ravikumar2015-01-271-1/+1
|
* combox/events.py: now when files are -- created, moved, removed, modified -- ↵Siddharth Ravikumar2015-01-211-5/+27
| | | | | | | their info is kept track in simple db file (using PickleDB). also updated tests/events_test.py to test if the newly added code to that updates the db works properly.
* tests/events_test.py: re-arranged the import statements.Siddharth Ravikumar2015-01-211-3/+5
|
* Renamed ComboxEventHandler (class) -> ComboxDirMonitorSiddharth Ravikumar2015-01-211-4/+4
| | | | | modified: combox/events.py modified: tests/events_test.py
* fleshed out the on_modified function in the ComboxEventHandler class + wrote ↵Siddharth Ravikumar2015-01-201-1/+35
| | | | | | | | | tests for it. modified: combox/events.py modified: tests/events_test.py new file: tests/files/ipsum.txt new file: tests/files/lorem.txt
* tests/events_test.py: fixed the path_deletedp function.Siddharth Ravikumar2015-01-201-5/+4
|
* 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/events_test.py: wrote test for file/directory rename under combox ↵Siddharth Ravikumar2015-01-161-0/+37
| | | | directory.
* tests/events_test.py: wrote test for file/directory deletion in combox ↵Siddharth Ravikumar2015-01-151-4/+35
| | | | directory.
* tests/events_test.py: wrote code to test whether files created in a nested ↵Siddharth Ravikumar2015-01-151-5/+17
| | | | directory properly are split properly to node dirs.
* added tests/events_test.py: tests the ComboxEventHandler thing.Siddharth Ravikumar2015-01-141-0/+103