File size: 597 Bytes
c939a45
 
 
 
cbefc72
c939a45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import streamlit.testing as stt

def test_delete_person():
    with stt.install_test_input():
        stt.test_runner.start("app.py")

        # Select the "Delete Person" option
        stt.test_input("Select Option", "Delete Person")

        # Enter the name of the person to delete
        stt.test_input("Enter Name", "John Doe")

        # Click the "Delete Person" button
        stt.test_input("Delete Person")

        # Verify the deletion message
        stt.test_output("John Doe deleted from the database!")

        # Clean up
        stt.test_runner.cleanup()

test_delete_person()