Skip to content
This repository was archived by the owner on Jun 30, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SERVER_CONFIG: test
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: RunestoneServer
- name: Set up Python 3.8
uses: actions/setup-python@v2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: '3.10'
- name: Build container
id: docker-build
run: |
Expand All @@ -40,7 +40,7 @@ jobs:
# Wait for the container to start and create a basic venv before running docker tools inside it.
sleep 5
# Invoke this directly, since the ``docker-tools`` script isn't installed yet. After this finishes, the docker tools are installed.
docker exec -t runestoneserver-runestone-1 bash -c "\$RUNESTONE_PATH/.venv/bin/python \$RUNESTONE_PATH/docker/docker_tools.py wait"
docker compose exec runestone bash -c "\$RUNESTONE_PATH/.venv/bin/python \$RUNESTONE_PATH/docker/docker_tools.py wait"
- name: Test
id: pytest
run: |
Expand All @@ -50,4 +50,4 @@ jobs:
echo "Checking if site is up..."
curl --silent --location 127.0.0.1 | grep "About Runestone"
# Test just the Runestone server.
docker-tools test --rs
docker-tools test --rs -- --skip_w3_validate
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# ************************************************************
# To build, execute `docker-tools <docker/docker_tools.py>` ``build``.

FROM python:3.9-bullseye
FROM python:3.10-bullseye

LABEL authors="@bnmnetp,@vsoch,@yarikoptic,@bjones1"

Expand Down
1 change: 0 additions & 1 deletion controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,6 @@ def questionBank():
for clause in query_clauses[1:]:
myquery = myquery & clause

print(myquery)
rows = db(myquery).select()

questions = []
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ def update_profile(
if is_free is None:
expected_string = "Course Selection"
else:
expected_string = "Our Mission" if is_free else "Payment Amount"
expected_string = "Support Runestone" if is_free else "Payment Amount"
username = username or self.username
first_name = first_name or self.first_name
last_name = last_name or self.last_name
Expand Down
10 changes: 7 additions & 3 deletions tests/test_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,20 @@ def test_qbank(test_client, test_user_1):
test_user_1.make_instructor()
test_user_1.login()
qname = "subc_b_fitb"
res = test_client.validate("admin/questionBank", data=dict(term=qname))
res = test_client.validate(
"admin/questionBank", data=dict(term=qname, language="any")
)
res = json.loads(res)
assert qname in res[0]
res = test_client.validate(
"admin/questionBank", data=dict(chapter="test_chapter_1")
"admin/questionBank", data=dict(chapter="test_chapter_1", language="any")
)
res = json.loads(res)
assert qname in [x[0] for x in res]
assert len(res) >= 4
res = test_client.validate("admin/questionBank", data=dict(author="test_author"))
res = test_client.validate(
"admin/questionBank", data=dict(author="test_author", language="any")
)
res = json.loads(res)
assert qname in [x[0] for x in res]
assert len(res) == 2
Expand Down
19 changes: 7 additions & 12 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,9 @@ def test_killer(test_assignment, test_client, test_user_1, runestone_db_tools):
("admin/doc", True, "Runestone Help and Documentation", 1),
# **Assignments**
# ----------------
("assignments/chooseAssignment", True, "Assignments", 1),
("assignments/doAssignment", True, "Bad Assignment ID", 1),
(
"assignments/practice",
True,
"Practice tool is not set up for this course yet.",
1,
),
("assignments/chooseAssignment", True, "Assignments", 2),
("assignments/doAssignment", True, "Bad Assignment ID", 2),
("assignments/practice", True, "Practice", 1),
("assignments/practiceNotStartedYet", True, "test_course_1", 1),
# **Default**
# ------------
Expand All @@ -104,20 +99,20 @@ def test_killer(test_assignment, test_client, test_user_1, runestone_db_tools):
("default/user/change_password", True, "Change password", 1),
# Runestone doesn't support this.
#'default/user/verify_email', False, 'Verify email', 1),
("default/user/retrieve_username", False, "Retrieve username", 1),
("default/user/retrieve_username", False, "Our Mission", 1),
("default/user/request_reset_password", False, "Request reset password", 1),
# This doesn't display a webpage, but instead redirects to courses.
# ('default/user/reset_password, False, 'Reset password', 1),
("default/user/impersonate", True, "Impersonate", 1),
# ("default/user/impersonate", True, "Impersonate", 1),
# FIXME: This produces an exception.
#'default/user/groups', True, 'Groups', 1),
("default/user/not_authorized", False, "Not authorized", 1),
("default/user/not_authorized", False, "Our Mission", 1),
# *Other pages*
#
# TODO: What is this for?
# ('default/call', False, 'Not found', 0),
("default/index", True, "Course Selection", 1),
("default/about", False, "About Us", 1),
("default/about", False, "About Runestone", 1),
("default/error", False, "Error: the document does not exist", 1),
("default/ack", False, "Acknowledgements", 1),
# web2py generates invalid labels for the radio buttons in this form.
Expand Down