bmc_hub/keepforlater/parse_test.py
Christian a604a3cc44 Add comprehensive test suite for vTiger integration and ticket module
- Implemented test scripts for vTiger account retrieval, contact data, and modules.
- Created a detailed test suite for the ticket module, covering database schema validation, ticket number generation, prepaid card constraints, and service logic.
- Added tests for vTiger field inspection and various queries related to accounts and sales orders.
- Introduced SQL migration scripts for the ALSO Cloud Billing foundation, including import jobs, lines, and mapping tables with necessary constraints and indices.
- Enhanced workflow columns in the import lines table to support matching and validation timestamps.
2026-06-20 03:29:51 +02:00

23 lines
824 B
Python

def replace_chunk(text, start_str, end_str, new_content):
start = text.find(start_str)
end = text.find(end_str, start)
if start != -1 and end != -1:
end += len(end_str)
return text[:start] + new_content + text[end:]
return text
with open('app/modules/sag/templates/detail.html', 'r') as f:
text = f.read()
# Test finding CSS
start_css = ".time-v1-track {"
end_css = " .time-v1-metric {\n font-size: 0.8rem;\n margin-top: 0.18rem;\n }"
if start_css in text and end_css in text:
print("Found CSS block")
# Test finding JS
start_js = " function renderTimeV1Timeline(entries) {"
end_js = " </div>\n `;\n }).join('');\n }"
if start_js in text and end_js in text:
print("Found JS block")