Remove real database in favour of simulated

This commit is contained in:
Marek Wolan
2023-11-18 03:40:08 +00:00
parent 815bdfe603
commit 77f3806ba7
9 changed files with 53 additions and 102 deletions

View File

@@ -19,16 +19,16 @@ def test_data_manipulation(uc2_network):
db_service.backup_database()
# First check that the DB client on the web_server can successfully query the users table on the database
assert db_client.query("SELECT * FROM user;")
assert db_client.query("SELECT")
# Now we run the DataManipulationBot
db_manipulation_bot.run()
# Now check that the DB client on the web_server cannot query the users table on the database
assert not db_client.query("SELECT * FROM user;")
assert not db_client.query("SELECT")
# Now restore the database
db_service.restore_backup()
# Now check that the DB client on the web_server can successfully query the users table on the database
assert db_client.query("SELECT * FROM user;")
assert db_client.query("SELECT")