Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def mutation_id_from_pk(pk):
mutant = Mutant.get(id=pk)
return RelativeMutationID(line=mutant.line.line, index=mutant.index, line_number=mutant.line.line_number)
def update_mutant_status(file_to_mutate, mutation_id, status, tests_hash):
sourcefile = SourceFile.get(filename=file_to_mutate)
line = Line.get(sourcefile=sourcefile, line=mutation_id.line, line_number=mutation_id.line_number)
mutant = Mutant.get(line=line, index=mutation_id.index)
mutant.status = status
mutant.tested_against_hash = tests_hash