Skip to content
Snippets Groups Projects
Commit 3ec27bac authored by Jakob Dieterle's avatar Jakob Dieterle
Browse files

fixed solution tests for markdown changes

parent 7747a38a
No related branches found
No related tags found
1 merge request!300Resolve "Add Markdown Viewer"
Pipeline #322082 canceled
......@@ -182,7 +182,7 @@ def reconstruct_code_from_table(table_el):
# https://github.com/SeleniumHQ/selenium/issues/2608
line.find_element_by_class_name('code-cell-content')
.find_element_by_class_name('code-line')
.get_attribute('textContent'))
.get_attribute('textContent').rstrip())
for line in lines
]
line_no_code_pairs.sort(key=lambda x: x[0]) # sort by ids
......
......@@ -25,7 +25,7 @@ class SubmissionTypeFactory(DjangoModelFactory):
full_score = 15
description = factory.Sequence(
lambda n: f'Type {n} \n<h1>This</h1> is a description containing html')
solution = factory.Sequence(lambda n: f'//This is a solution\n#include<stdio.h>\n\nint main() {{\nprintf("Hello World\\n");\nreturn {n};\n}}') # noqa
solution = factory.Sequence(lambda n: f'test case {n}') # noqa
programming_language = models.SubmissionType.C
exam_type = factory.SubFactory(ExamTypeFactory)
......@@ -87,7 +87,7 @@ class SubmissionFactory(DjangoModelFactory):
class Meta:
model = models.Submission
text = factory.Sequence(lambda n: f'#include<stdio.h>\n\nint main() {{\nprintf("Hello World\\n");\nreturn {n};\n}}') # noqa
text = factory.Sequence(lambda n: f'test case {n}\nx\nx\nx\ntest case {n}') # noqa
type = factory.SubFactory(SubmissionTypeFactory)
student = factory.SubFactory(StudentInfoFactory)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment