def setUp(self):

        self.d = dict(
            {
                "duration_total": 0,
                "duration_watched": 0,
                "done": True,
                "questions_correct": 4,
                "questions_incorrect": 0,
                "questions_total": 0,
            }
        )

        self.c = progress.completion()
        self.c2 = progress.completion()
        self.c2.dict = dict(
            {
                "duration_total": 0,
                "duration_watched": 0,
                "done": True,
                "questions_correct": 2,
                "questions_incorrect": 1,
                "questions_total": 0,
            }
        )

        self.cplusc2 = dict(
            {
                "duration_total": 0,
                "duration_watched": 0,
                "done": True,
                "questions_correct": 2,
                "questions_incorrect": 1,
                "questions_total": 0,
            }
        )

        self.oth = dict(
            {
                "duration_total": 0,
                "duration_watched": 0,
                "done": True,
                "questions_correct": 4,
                "questions_incorrect": 0,
                "questions_total": 7,
            }
        )

        self.x = MagicMock()
        self.x.dict = self.oth

        self.d_oth = {
            "duration_total": 0,
            "duration_watched": 0,
            "done": True,
            "questions_correct": 4,
            "questions_incorrect": 0,
            "questions_total": 7,
        }
Esempio n. 2
0
    def setUp(self):

        self.d = dict({
            'duration_total': 0,
            'duration_watched': 0,
            'done': True,
            'questions_correct': 4,
            'questions_incorrect': 0,
            'questions_total': 0
        })

        self.c = progress.completion()
        self.c2 = progress.completion()
        self.c2.dict = dict({
            'duration_total': 0,
            'duration_watched': 0,
            'done': True,
            'questions_correct': 2,
            'questions_incorrect': 1,
            'questions_total': 0
        })

        self.cplusc2 = dict({
            'duration_total': 0,
            'duration_watched': 0,
            'done': True,
            'questions_correct': 2,
            'questions_incorrect': 1,
            'questions_total': 0
        })

        self.oth = dict({
            'duration_total': 0,
            'duration_watched': 0,
            'done': True,
            'questions_correct': 4,
            'questions_incorrect': 0,
            'questions_total': 7
        })

        self.x = MagicMock()
        self.x.dict = self.oth

        self.d_oth = {
            'duration_total': 0,
            'duration_watched': 0,
            'done': True,
            'questions_correct': 4,
            'questions_incorrect': 0,
            'questions_total': 7
        }
Esempio n. 3
0
        def setUp(self):

                self.d = dict({'duration_total': 0,
                               'duration_watched': 0,
                               'done': True,
                               'questions_correct': 4,
                               'questions_incorrect': 0,
                               'questions_total': 0})

                self.c = progress.completion()
                self.c2 = progress.completion()
                self.c2.dict = dict({'duration_total': 0,
                                     'duration_watched': 0,
                                     'done': True,
                                     'questions_correct': 2,
                                     'questions_incorrect': 1,
                                     'questions_total': 0})

                self.cplusc2 = dict({'duration_total': 0,
                                     'duration_watched': 0,
                                     'done': True,
                                     'questions_correct': 2,
                                     'questions_incorrect': 1,
                                     'questions_total': 0})

                self.oth = dict({'duration_total': 0,
                                 'duration_watched': 0,
                                 'done': True,
                                 'questions_correct': 4,
                                 'questions_incorrect': 0,
                                 'questions_total': 7})

                self.x = MagicMock()
                self.x.dict = self.oth

                self.d_oth = {'duration_total': 0,
                              'duration_watched': 0,
                              'done': True,
                              'questions_correct': 4,
                              'questions_incorrect': 0,
                              'questions_total': 7}
Esempio n. 4
0
 def test_repr(self):
         self.assertEqual(self.c.__repr__(), str(progress.completion()))
Esempio n. 5
0
 def test_repr(self):
     self.assertEqual(self.c.__repr__(), str(progress.completion()))