Skip to content
Snippets Groups Projects

Resolve "Updating own past feedback sets other tutors assignment to is_done=True"

3 files
+ 99
8
Compare changes
  • Side-by-side
  • Inline
Files
3
@@ -6,7 +6,7 @@ from selenium.webdriver.support import expected_conditions as ec
@@ -6,7 +6,7 @@ from selenium.webdriver.support import expected_conditions as ec
from core.models import UserAccount, Submission, FeedbackComment
from core.models import UserAccount, Submission, FeedbackComment
from functional_tests.util import (login, create_browser, reset_browser_after_test,
from functional_tests.util import (login, create_browser, reset_browser_after_test,
go_to_subscription, wait_until_code_changes,
go_to_subscription, wait_until_code_changes,
reconstruct_submission_code)
reconstruct_submission_code, correct_some_submission)
from util import factory_boys as fact
from util import factory_boys as fact
@@ -93,13 +93,7 @@ class UntestedParent:
@@ -93,13 +93,7 @@ class UntestedParent:
def test_can_give_max_score(self):
def test_can_give_max_score(self):
self._login()
self._login()
go_to_subscription(self)
go_to_subscription(self)
code = reconstruct_submission_code(self)
code = correct_some_submission()
self.browser.find_element_by_id('score-full').click()
submit_btn = self.browser.find_element_by_id('submit-feedback')
submit_btn.click()
WebDriverWait(self.browser, 10).until(
wait_until_code_changes(self, code)
)
submission_for_code = Submission.objects.get(text=code)
submission_for_code = Submission.objects.get(text=code)
self.assertEqual(self.sub_type.full_score, submission_for_code.feedback.score)
self.assertEqual(self.sub_type.full_score, submission_for_code.feedback.score)
Loading