@@ -16,7 +16,13 @@ def test_fix_is_present_in_javascript(self):
1616 """Verify that the fix line exists in item_editor.js"""
1717 # Use BASEDIR from settings to construct the path
1818 js_file_path = os .path .join (
19- settings .BASEDIR , '..' , '..' , 'feincms' , 'static' , 'feincms' , 'item_editor.js'
19+ settings .BASEDIR ,
20+ ".." ,
21+ ".." ,
22+ "feincms" ,
23+ "static" ,
24+ "feincms" ,
25+ "item_editor.js" ,
2026 )
2127 js_file_path = os .path .normpath (js_file_path )
2228
@@ -47,18 +53,24 @@ def test_fix_is_present_in_javascript(self):
4753
4854 def test_fix_order_is_correct (self ):
4955 """Verify that the disable happens AFTER the click, not before."""
50- base_dir = os .path .dirname (os .path .dirname (os .path .dirname (os .path .dirname (__file__ ))))
56+ base_dir = os .path .dirname (
57+ os .path .dirname (os .path .dirname (os .path .dirname (__file__ )))
58+ )
5159 js_file_path = os .path .join (
52- base_dir , ' feincms' , ' static' , ' feincms' , ' item_editor.js'
60+ base_dir , " feincms" , " static" , " feincms" , " item_editor.js"
5361 )
5462 js_file_path = os .path .normpath (js_file_path )
5563
5664 with open (js_file_path , "r" ) as f :
5765 content = f .read ()
5866
5967 # Find positions of both statements
60- click_pos = content .find ('form_element.find("[type=submit][name=_save]").click()' )
61- disable_pos = content .find ('form_element.find("input[type=submit]").attr("disabled", "disabled")' )
68+ click_pos = content .find (
69+ 'form_element.find("[type=submit][name=_save]").click()'
70+ )
71+ disable_pos = content .find (
72+ 'form_element.find("input[type=submit]").attr("disabled", "disabled")'
73+ )
6274
6375 self .assertGreater (click_pos , 0 , "The click() statement should be present" )
6476 self .assertGreater (disable_pos , 0 , "The disable statement should be present" )
0 commit comments