File size: 918 Bytes
0d76968
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import os
import re

def verify_app_logic():
    with open("app.py", "r") as f:
        content = f.read()

    # Check IFrame src
    iframe_match = re.search(r'iframe src="/file=\{abspath\}"', content)
    if iframe_match:
        print("PASS: IFrame src format is correct.")
    else:
        print("FAIL: IFrame src format is incorrect.")

    # Check allowed_paths
    allowed_paths_match = re.search(r'allowed_paths=\["/app"\]', content)
    if allowed_paths_match:
        print("PASS: allowed_paths is restricted to /app.")
    else:
        print("FAIL: allowed_paths is not restricted correctly.")

    # Check branch name
    branch_match = re.search(r'fix/jules-final-submission-branch', content)
    if branch_match:
        print("PASS: Branch name includes 'jules' as requested.")
    else:
        print("FAIL: Branch name does not include 'jules'.")

if __name__ == "__main__":
    verify_app_logic()