File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -756,16 +756,18 @@ def test_find_with_lanuages(self):
756756 languages = ['ga_IE' ])
757757 self .assertEqual (result , mo_file )
758758
759- def test_find_with_no_lang (self ):
759+ @unittest .mock .patch ('gettext._expand_lang' )
760+ def test_find_with_no_lang (self , patch_expand_lang ):
760761 # no language can be found
761- result = gettext .find ('foo' )
762- self . assertEqual ( result , None )
762+ gettext .find ('foo' )
763+ patch_expand_lang . assert_called_with ( 'C' )
763764
764- def test_find_with_c (self ):
765+ @unittest .mock .patch ('gettext._expand_lang' )
766+ def test_find_with_c (self , patch_expand_lang ):
765767 # 'C' is already in languages
766768 self .env .set ('LANGUAGE' , 'C' )
767- result = gettext .find ('foo' )
768- self . assertEqual ( result , None )
769+ gettext .find ('foo' )
770+ patch_expand_lang . assert_called_with ( 'C' )
769771
770772 def test_find_all (self ):
771773 # test that all are returned when all is set
You can’t perform that action at this time.
0 commit comments