BUG352-NEIL2 #68

Closed
mrlan wants to merge 2 commits from BUG352-NEIL2 into Hui-Organize

Added the test script.

Created by Hui on behalf of Neil.

Added the test script. Created by Hui on behalf of Neil.
mrlan added 3 commits 2024-05-09 12:56:05 +08:00
mrlan reviewed 2024-05-09 12:57:02 +08:00
@ -0,0 +18,4 @@
f'mysql -u root -p{PASSWORD} -e "DROP DATABASE IF EXISTS {DB_NAME};"',
f'mysql -u root -p{PASSWORD} -e "CREATE DATABASE {DB_NAME};"',
f'mysql -u root -p{PASSWORD} -e "GRANT ALL PRIVILEGES ON {DB_NAME}.* TO lrr@localhost WITH GRANT OPTION;"',
f'mysql -u root -p{PASSWORD} {DB_NAME} < C:\\xampp\\htdocs\\LRR\\lrr_database.sql'] #make sure th link of the database is ok
Poster
Owner

@neil

Will the absolute path C:\\xampp\\htdocs\\LRR\\lrr_database.sql work for other people?

@neil Will the absolute path `C:\\xampp\\htdocs\\LRR\\lrr_database.sql` work for other people?
Collaborator

yes sir , it is the standard path @all could use.

yes sir , it is the standard path @all could use.
mrlan reviewed 2024-05-09 13:00:12 +08:00
@ -104,22 +105,22 @@ def test_generate_password():
driver_open = webdriver.Chrome()
Poster
Owner

@neil
conftest.py already provides a fixture called driver, so use that fixture instead of making a new one through webdriver.Chrome()

@neil conftest.py already provides a fixture called `driver`, so use that fixture instead of making a new one through `webdriver.Chrome()`
mrlan reviewed 2024-05-09 13:01:03 +08:00
@ -27,3 +28,3 @@
def login_lecturer(drivers):
# Open the website
drivers.get("http://localhost/lrr/")
drivers.get("http://localhost/LRR/")
Poster
Owner

@neil

Should use the fixture url defined in conftest.py.

@neil Should use the fixture `url` defined in conftest.py.
Collaborator

ok i change it

ok i change it
mrlan reviewed 2024-05-09 13:02:46 +08:00
@ -49,3 +50,3 @@
time.sleep(25)
time.sleep(15)
def test_createTA():
Poster
Owner

@neil

Fixtures like url, driver, restore_database defined in conftest.py should be used as arguments for test_createTA().

@neil Fixtures like `url, driver, restore_database` defined in conftest.py should be used as arguments for `test_createTA()`.
Collaborator

ok i change that

ok i change that
Poster
Owner

@neil

No assert statement in test functions?

@neil No assert statement in test functions?
Collaborator

@neil

No assert statement in test functions?

ok

> @neil > > No assert statement in test functions? > > ok
neil added 1 commit 2024-05-13 20:05:57 +08:00
neil added 1 commit 2024-05-17 13:42:16 +08:00
mrlan closed this pull request 2024-09-15 15:35:29 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mrlan/LRR#68
There is no content yet.