def test_max_similarity():
 submission = SubmissionFactory.build(similarity=0, mt_similarity=0)
 assert (submission.max_similarity == 0)
 submission = SubmissionFactory.build(similarity=0.5, mt_similarity=0.6)
 assert (submission.max_similarity == 0.6)
 submission = SubmissionFactory.build(similarity=0.5, mt_similarity=None)
 assert (submission.max_similarity == 0.5)
 submission = SubmissionFactory.build(similarity=None, mt_similarity=None)
 assert (submission.max_similarity == 0)

def test_max_similarity ( ) : submission = SubmissionFactory . build ( similarity = 0 , mt_similarity = 0 ) assert ( submission . max_similarity == 0 ) submission = SubmissionFactory . build ( similarity = 0.5 , mt_similarity = 0.6 ) assert ( submission . max_similarity == 0.6 ) submission = SubmissionFactory . build ( similarity = 0.5 , mt_similarity = None ) assert ( submission . max_similarity == 0.5 ) submission = SubmissionFactory . build ( similarity = None , mt_similarity = None ) assert ( submission . max_similarity == 0 )
tests that the maximum similarity is properly returned .