@@ -241,6 +241,32 @@ def test_merge_files(self, run_around_test):
241
241
assert ret .entry_type == EntryType .JSON
242
242
assert ret .content == {"foo3" : "bar3" }
243
243
244
+ def test_get_files_for_single_file (self , run_around_test ):
245
+ commit = Commit ("Upsert dummy1-test.json" )
246
+ upsert_json = Change (
247
+ "/test/dummy1-test.json" , ChangeType .UPSERT_JSON , {"foo" : "bar" }
248
+ )
249
+ dogma .push (project_name , repo_name , commit , [upsert_json ])
250
+
251
+ ret = dogma .get_files (project_name , repo_name , "/test/dummy1-test.json" )
252
+ assert len (ret ) == 1
253
+
254
+ def test_get_files_for_multiple_file (self , run_around_test ):
255
+ commit = Commit ("Upsert dummy1-test.json" )
256
+ upsert_json = Change (
257
+ "/dummy1-test.json" , ChangeType .UPSERT_JSON , {"foo" : "bar" }
258
+ )
259
+ dogma .push (project_name , repo_name , commit , [upsert_json ])
260
+
261
+ commit = Commit ("Upsert dummy2-test.json" )
262
+ upsert_json = Change (
263
+ "/dummy2-test.json" , ChangeType .UPSERT_JSON , {"foo" : "bar" }
264
+ )
265
+ dogma .push (project_name , repo_name , commit , [upsert_json ])
266
+
267
+ ret = dogma .get_files (project_name , repo_name , "/dummy*-test.json" )
268
+ assert len (ret ) == 2
269
+
244
270
@staticmethod
245
271
def push_later ():
246
272
time .sleep (1 )
0 commit comments