Exemple #1
0
    def test_count(self):

        total = 10
        result = response((0, total))

        self.assertEqual(result['total'], total)
        self.assertTrue(result['success'])
Exemple #2
0
    def test_count(self):

        total = 10
        result = response((0, total))

        self.assertEqual(result['total'], total)
        self.assertTrue(result['success'])
Exemple #3
0
    def test_dict(self):

        result = response({1: 1})

        self.assertEqual(result['total'], 1)
        self.assertTrue(result['success'])
Exemple #4
0
    def test_empty_iterable(self):

        result = response([])

        self.assertEqual(result['total'], 0)
        self.assertTrue(result['success'])
Exemple #5
0
    def test_simple(self):

        result = response(1)

        self.assertEqual(result['total'], 1)
        self.assertTrue(result['success'])
Exemple #6
0
    def test_none(self):

        result = response(None)

        self.assertEqual(result['total'], 0)
        self.assertTrue(result['success'])
Exemple #7
0
    def test_dict(self):

        result = response({1: 1})

        self.assertEqual(result['total'], 1)
        self.assertTrue(result['success'])
Exemple #8
0
    def test_empty_iterable(self):

        result = response([])

        self.assertEqual(result['total'], 0)
        self.assertTrue(result['success'])
Exemple #9
0
    def test_simple(self):

        result = response(1)

        self.assertEqual(result['total'], 1)
        self.assertTrue(result['success'])
Exemple #10
0
    def test_none(self):

        result = response(None)

        self.assertEqual(result['total'], 0)
        self.assertTrue(result['success'])