def test_needs_scorelog():
 submission = SubmissionFactory.build(field=SubmissionFields.STATE, type=SubmissionTypes.NORMAL, old_value=UNTRANSLATED, new_value=TRANSLATED)
 assert (not submission.needs_scorelog())
 submission = SubmissionFactory.build(field=SubmissionFields.STATE, type=SubmissionTypes.NORMAL, old_value=TRANSLATED, new_value=UNTRANSLATED)
 assert submission.needs_scorelog()
 submission = SubmissionFactory.build(field=SubmissionFields.TARGET, type=SubmissionTypes.SUGG_ADD, old_value=u'', new_value=u'')
 assert submission.needs_scorelog()

def test_needs_scorelog ( ) : submission = SubmissionFactory . build ( field = SubmissionFields . STATE , type = SubmissionTypes . NORMAL , old_value = UNTRANSLATED , new_value = TRANSLATED ) assert ( not submission . needs_scorelog ( ) ) submission = SubmissionFactory . build ( field = SubmissionFields . STATE , type = SubmissionTypes . NORMAL , old_value = TRANSLATED , new_value = UNTRANSLATED ) assert submission . needs_scorelog ( ) submission = SubmissionFactory . build ( field = SubmissionFields . TARGET , type = SubmissionTypes . SUGG_ADD , old_value = u'' , new_value = u'' ) assert submission . needs_scorelog ( )
tests if the submission needs to be logged or not .