Server backup 2026-11-07 of uncommitted work in projects/pharma-web-celtic
Snapshot of the working tree on srv1071960 (branch main), taken during server cleanup. .env files, node_modules, builds, logs and media were excluded.
This commit is contained in:
@@ -98,3 +98,18 @@ class TestSignatures:
|
||||
def test_user_text_is_escaped(self):
|
||||
html = _render(_context([_doctor("<script>alert(1)</script>")]))
|
||||
assert "<script>" not in html
|
||||
|
||||
|
||||
class TestStockistVisits:
|
||||
def test_stockist_table_printed_only_when_stockists_were_visited(self):
|
||||
assert "NAME OF THE STOCKIST" not in _render(_context([_doctor("Dr Sen")]))
|
||||
dcr = NS(
|
||||
mr=NS(full_name="Sumit Patel", employee_code="MR001"), headquarters=NS(name="Bhubaneswar"),
|
||||
report_date=date(2026, 9, 21), stockist_visit="", order_value="", mr_remarks="",
|
||||
)
|
||||
stockist = NS(stockist=NS(name="Ganesh Distributors"), pob="12000", visit_time=datetime(2026, 9, 21, 11, 0).time())
|
||||
done = _render(build_dcr_context(dcr, [_doctor("Dr Sen")], [], None, None, [stockist]))
|
||||
assert "NAME OF THE STOCKIST" in done and "Ganesh Distributors" in done and "12000" in done
|
||||
dcr.report_type = "PLAN"
|
||||
plan = _render(build_dcr_context(dcr, [], [], None, None, [stockist]))
|
||||
assert "STOCKISTS TO VISIT" in plan and "11:00" in plan
|
||||
|
||||
Reference in New Issue
Block a user