from sqjobs.contrib.django.djsqjobs.result_job import ResultJob
from sqjobs.contrib.django.djsqjobs.models import JobStatus

from .fixtures import Divider


class ResultDivider(ResultJob):
    name = 'resultdivider'

    def __init__(self):
        super(ResultDivider, self).__init__()

    def set_up(self, *args, **kwargs):
        super_setup = super(ResultDivider, self).set_up(*args, **kwargs)
        return super_setup

    def run(self, num1, num2, *args, **kwargs):
        self.result = num1 / num2
        return self.result

    def on_failure(self, *args, **kwargs):
        super_on_failure = super(ResultDivider, self).on_failure(*args, **kwargs)
        self.err = 'ZeroDivisionError'
        return super_on_failure

from sqjobs.contrib.django.djsqjobs.result_job import ResultJob
from sqjobs.contrib.django.djsqjobs.models import JobStatus

from .fixtures import Divider


class ResultDivider(ResultJob):
    name = 'resultdivider'

    def __init__(self):
        super(ResultDivider, self).__init__()

    def set_up(self, *args, **kwargs):
        super_setup = super(ResultDivider, self).set_up(*args, **kwargs)
        return super_setup

    def run(self, num1, num2, *args, **kwargs):
        self.result = num1 // num2
        return self.result

    def on_failure(self, *args, **kwargs):
        super_on_failure = super(ResultDivider, self).on_failure(*args, **kwargs)
        self.err = 'ZeroDivisionError'
        return super_on_failure

Fix python3 tests