You might like to take it and make it for your own, adding bits here and there so that you can run your own apps in tests. Open the Database tab in P圜harm (usually on the right hand side) 2. Manual connection Use the following steps to perform the manual connection: 1. On looking through this repo, you might assume that I have only added functionality to those class and functions that I have so far used in my apps. To connect to a SQLite database on P圜harm you have two options: 1. You might want to look at the mock classes here I built it to test for myself the browser storage indexed_DB using anvil-works. This is only an example and doesn’t have the automated scripts. If you are interested in seeing more, I made a self-contained repo that you can run the tests in. is the boat length saved? Let's check the browser indexed_dbīoat_name = form_create.text_box_name.textĪssert boat_name = sail_boat_storeĪssert float(form_create.text_box_length.text) = sail_boat_storeīoat_row = app_(name=boat_name, user_email=user)Īssert float(form_create.text_box_length.text) = boat_row.length Sail_boat_store = indexed_db.create_store('sail_boats') # get the create FORM in the column panelįorm_create = form_home.main_column_panel.get_components()įorm_create.text_box_name.text = random_name()įorm_create.text_box_length.text = random_number(size=2) I can run it in Pycharm but cannot compile it as an exe using. Create an external tool to execute the SQL file using SQLite3.exe. Execute the query in the console then select export data from the console toolbar. From there you can specify the extractor to use and the location of the file. """This method will test this CRUD functionality.""" Its a neat tool that does the trick by making a stand alone executable from a Python. Open the query in console, right-click, select execute to file. The result is that I can now run a test like that below, on my local computer: def test_create(self):
0 Comments
Leave a Reply. |