@@ -37,6 +37,35 @@ def test_fileDeletedOnMyDevice(self):
37
37
self .assertCountEqual (mySystemFileProcesses , expectedMySystemFileProcesses )
38
38
self .assertCountEqual (otherSystemFileProcesses , expectedOtherSystemFileProcesses )
39
39
40
+
41
+ def test_directoryDeletedOnMyDevice (self ):
42
+ mySystemModifications = {
43
+ "dirs_created" : [],
44
+ "dirs_deleted" : ['deleted_directory' ],
45
+ "dirs_modified" : [],
46
+ "dirs_moved" : [],
47
+ "files_created" : [],
48
+ "files_deleted" : [],
49
+ "files_modified" : [],
50
+ "files_moved" : [],
51
+ }
52
+ otherSystemModifications = {
53
+ "dirs_created" : [],
54
+ "dirs_deleted" : [],
55
+ "dirs_modified" : [],
56
+ "dirs_moved" : [],
57
+ "files_created" : [],
58
+ "files_deleted" : [],
59
+ "files_modified" : [],
60
+ "files_moved" : [],
61
+ }
62
+ synchronizer = SynchronizationManager (mySystemModifications , otherSystemModifications )
63
+ mySystemFileProcesses , otherSystemFileProcesses = synchronizer .getFileProcesses ()
64
+ expectedMySystemFileProcesses = []
65
+ expectedOtherSystemFileProcesses = [('deletedDirectory' , 'deleted_directory' )]
66
+ self .assertCountEqual (mySystemFileProcesses , expectedMySystemFileProcesses )
67
+ self .assertCountEqual (otherSystemFileProcesses , expectedOtherSystemFileProcesses )
68
+
40
69
def test_fileDeletedOnOtherDevice (self ):
41
70
mySystemModifications = {
42
71
"dirs_created" : [],
@@ -65,6 +94,35 @@ def test_fileDeletedOnOtherDevice(self):
65
94
self .assertCountEqual (otherSystemFileProcesses , expectedOtherSystemFileProcesses )
66
95
self .assertCountEqual (mySystemFileProcesses , expectedMySystemFileProcesses )
67
96
97
+
98
+ def test_directoryDeletedOnOtherDevice (self ):
99
+ mySystemModifications = {
100
+ "dirs_created" : [],
101
+ "dirs_deleted" : [],
102
+ "dirs_modified" : [],
103
+ "dirs_moved" : [],
104
+ "files_created" : [],
105
+ "files_deleted" : [],
106
+ "files_modified" : [],
107
+ "files_moved" : [],
108
+ }
109
+ otherSystemModifications = {
110
+ "dirs_created" : [],
111
+ "dirs_deleted" : ['deleted_directory' ],
112
+ "dirs_modified" : [],
113
+ "dirs_moved" : [],
114
+ "files_created" : [],
115
+ "files_deleted" : [],
116
+ "files_modified" : [],
117
+ "files_moved" : [],
118
+ }
119
+ synchronizer = SynchronizationManager (mySystemModifications , otherSystemModifications )
120
+ mySystemFileProcesses , otherSystemFileProcesses = synchronizer .getFileProcesses ()
121
+ expectedMySystemFileProcesses = [('deletedDirectory' , 'deleted_directory' )]
122
+ expectedOtherSystemFileProcesses = []
123
+ self .assertCountEqual (otherSystemFileProcesses , expectedOtherSystemFileProcesses )
124
+ self .assertCountEqual (mySystemFileProcesses , expectedMySystemFileProcesses )
125
+
68
126
def test_fileDeletedOnBothDevices (self ):
69
127
mySystemModifications = {
70
128
"dirs_created" : [],
@@ -121,6 +179,35 @@ def test_fileCreatedOnMyDevice(self):
121
179
self .assertCountEqual (mySystemFileProcesses , expectedMySystemFileProcesses ,)
122
180
self .assertCountEqual (otherSystemFileProcesses , expectedOtherSystemFileProcesses )
123
181
182
+ def test_directoryCreatedOnMyDevice (self ):
183
+
184
+ mySystemModifications = {
185
+ "dirs_created" : ['created_directory' ],
186
+ "dirs_deleted" : [],
187
+ "dirs_modified" : [],
188
+ "dirs_moved" : [],
189
+ "files_created" : [],
190
+ "files_deleted" : [],
191
+ "files_modified" : [],
192
+ "files_moved" : [],
193
+ }
194
+ otherSystemModifications = {
195
+ "dirs_created" : [],
196
+ "dirs_deleted" : [],
197
+ "dirs_modified" : [],
198
+ "dirs_moved" : [],
199
+ "files_created" : [],
200
+ "files_deleted" : [],
201
+ "files_modified" : [],
202
+ "files_moved" : [],
203
+ }
204
+ synchronizer = SynchronizationManager (mySystemModifications , otherSystemModifications )
205
+ mySystemFileProcesses , otherSystemFileProcesses = synchronizer .getFileProcesses ()
206
+ expectedMySystemFileProcesses = []
207
+ expectedOtherSystemFileProcesses = [('createDirectory' , 'created_directory' )]
208
+ self .assertCountEqual (mySystemFileProcesses , expectedMySystemFileProcesses ,)
209
+ self .assertCountEqual (otherSystemFileProcesses , expectedOtherSystemFileProcesses )
210
+
124
211
125
212
def test_fileCreatedOnOtherDevice (self ):
126
213
mySystemModifications = {
0 commit comments