@@ -26,15 +26,14 @@ def setUp(self):
2626 localization_dir = here ('fixtures/pl' )
2727 )
2828
29- self .ctx .add_reference ('aboutDownloads.ftl' )
3029 try :
3130 self .ctx .maybe_add_localization ('aboutDownloads.dtd' )
3231 self .ctx .maybe_add_localization ('aboutDownloads.properties' )
3332 except RuntimeError :
3433 self .skipTest ('compare-locales required' )
3534
3635 def test_hardcoded_node (self ):
37- self .ctx .add_transforms ('aboutDownloads.ftl' , [
36+ self .ctx .add_transforms ('aboutDownloads.ftl' , 'aboutDownloads.ftl' , [
3837 FTL .Message (
3938 id = FTL .Identifier ('about' ),
4039 value = FTL .Pattern ([
@@ -59,7 +58,7 @@ def test_hardcoded_node(self):
5958 )
6059
6160 def test_merge_single_message (self ):
62- self .ctx .add_transforms ('aboutDownloads.ftl' , [
61+ self .ctx .add_transforms ('aboutDownloads.ftl' , 'aboutDownloads.ftl' , [
6362 FTL .Message (
6463 id = FTL .Identifier ('title' ),
6564 value = COPY (
@@ -85,7 +84,7 @@ def test_merge_single_message(self):
8584 )
8685
8786 def test_merge_one_changeset (self ):
88- self .ctx .add_transforms ('aboutDownloads.ftl' , [
87+ self .ctx .add_transforms ('aboutDownloads.ftl' , 'aboutDownloads.ftl' , [
8988 FTL .Message (
9089 id = FTL .Identifier ('title' ),
9190 value = COPY (
@@ -124,7 +123,7 @@ def test_merge_one_changeset(self):
124123 )
125124
126125 def test_merge_two_changesets (self ):
127- self .ctx .add_transforms ('aboutDownloads.ftl' , [
126+ self .ctx .add_transforms ('aboutDownloads.ftl' , 'aboutDownloads.ftl' , [
128127 FTL .Message (
129128 id = FTL .Identifier ('title' ),
130129 value = COPY (
@@ -177,7 +176,7 @@ def test_merge_two_changesets(self):
177176 self .assertDictEqual (merged_b , expected_b )
178177
179178 def test_serialize_changeset (self ):
180- self .ctx .add_transforms ('aboutDownloads.ftl' , [
179+ self .ctx .add_transforms ('aboutDownloads.ftl' , 'aboutDownloads.ftl' , [
181180 FTL .Message (
182181 id = FTL .Identifier ('title' ),
183182 value = COPY (
@@ -247,7 +246,7 @@ def tearDown(self):
247246
248247 def test_missing_reference_file (self ):
249248 with self .assertRaises (UnreadableReferenceError ):
250- self .ctx .add_reference ( ' missing.ftl' )
249+ self .ctx .add_transforms ( 'some.ftl' , ' missing.ftl', [] )
251250
252251
253252class TestIncompleteLocalization (unittest .TestCase ):
@@ -261,13 +260,12 @@ def setUp(self):
261260 localization_dir = here ('fixtures/pl' )
262261 )
263262
264- self .ctx .add_reference ('toolbar.ftl' )
265263 try :
266264 self .ctx .maybe_add_localization ('browser.dtd' )
267265 except RuntimeError :
268266 self .skipTest ('compare-locales required' )
269267
270- self .ctx .add_transforms ('toolbar.ftl' , [
268+ self .ctx .add_transforms ('toolbar.ftl' , 'toolbar.ftl' , [
271269 FTL .Message (
272270 id = FTL .Identifier ('urlbar-textbox' ),
273271 attributes = [
@@ -323,7 +321,6 @@ def setUp(self):
323321 localization_dir = here ('fixtures/pl' )
324322 )
325323
326- self .ctx .add_reference ('privacy.ftl' )
327324 try :
328325 self .ctx .maybe_add_localization ('privacy.dtd' )
329326 except RuntimeError :
@@ -334,7 +331,7 @@ def tearDown(self):
334331 logging .disable (logging .NOTSET )
335332
336333 def test_existing_target_ftl_missing_string (self ):
337- self .ctx .add_transforms ('privacy.ftl' , [
334+ self .ctx .add_transforms ('privacy.ftl' , 'privacy.ftl' , [
338335 FTL .Message (
339336 id = FTL .Identifier ('dnt-learn-more' ),
340337 value = COPY (
@@ -362,7 +359,7 @@ def test_existing_target_ftl_missing_string(self):
362359 )
363360
364361 def test_existing_target_ftl_existing_string (self ):
365- self .ctx .add_transforms ('privacy.ftl' , [
362+ self .ctx .add_transforms ('privacy.ftl' , 'privacy.ftl' , [
366363 FTL .Message (
367364 id = FTL .Identifier ('dnt-description' ),
368365 value = COPY (
@@ -401,7 +398,7 @@ def test_existing_target_ftl_existing_string(self):
401398 )
402399
403400 def test_existing_target_ftl_with_all_messages (self ):
404- self .ctx .add_transforms ('privacy.ftl' , [
401+ self .ctx .add_transforms ('privacy.ftl' , 'privacy.ftl' , [
405402 FTL .Message (
406403 id = FTL .Identifier ('dnt-description' ),
407404 value = COPY (
@@ -429,5 +426,4 @@ def test_add_ftl(self):
429426 localization_dir = here ('fixtures/pl' )
430427 )
431428
432- ctx .add_reference ('privacy.ftl' )
433429 ctx .maybe_add_localization ('privacy.ftl' )
0 commit comments