Skip to content

Commit 697403d

Browse files
committed
Fix old imports for test code
1 parent 7d8ffc9 commit 697403d

File tree

6 files changed

+52
-5
lines changed

6 files changed

+52
-5
lines changed

test/bases/rsptx/author_server_api/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from runestone.author_server_api import core
1+
from rsptx.author_server_api import core
22

33

44
def test_sample():

test/components/rsptx/data_extract/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from runestone.data_extract import core
1+
from rsptx.data_extract import core
22

33

44
def test_sample():

test/components/rsptx/db/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from runestone.db import core
1+
from rsptx.db import core
22

33

44
def test_sample():

test/components/rsptx/db/test_crud.py

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
from rsptx.db.crud import *
2+
import pytest
3+
4+
async def test_create_useinfo_entry():
5+
assert create_useinfo_entry is not None
6+
# Write the code for the test here.
7+
# Tip: use the pytest.raises context manager to test for exceptions.
8+
# create and new entry
9+
with pytest.raises(Exception):
10+
create_useinfo_entry(
11+
sid="test_sid",
12+
div_id="test_div_id",
13+
event="test_event",
14+
act="test_act",
15+
timestamp="test_timestamp",
16+
course_id="test_course_id",
17+
chapter="test_chapter",
18+
subchapter="test_subchapter",
19+
session="test_session",
20+
ip_address="test_ip_address",
21+
)
22+
x = await create_useinfo_entry(
23+
sid="test_sid",
24+
div_id="test_div_id",
25+
event="test_event",
26+
act="test_act",
27+
timestamp="test_timestamp",
28+
course_id="test_course_id",
29+
chapter="test_chapter",
30+
subchapter="test_subchapter",
31+
session="test_session",
32+
ip_address="test_ip_address",
33+
)
34+
assert x is not None
35+
assert x.sid == "test_sid"
36+
assert x.div_id == "test_div_id"
37+
assert x.event == "test_event"
38+
assert x.act == "test_act"
39+
assert x.timestamp == "test_timestamp"
40+
assert x.course_id == "test_course_id"
41+
assert x.chapter == "test_chapter"
42+
assert x.subchapter == "test_subchapter"
43+
assert x.session == "test_session"
44+
assert x.ip_address == "test_ip_address"
45+
46+
47+

test/components/rsptx/forms/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from runestone.forms import core
1+
from rsptx.forms import core
22

33

44
def test_sample():

test/components/rsptx/visualization/test_core.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from runestone.visualization import core
1+
from rsptx.visualization import core
22

33

44
def test_sample():

0 commit comments

Comments
 (0)