示例#1
0
    def test_count(self):

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

        self.assertEqual(result['total'], total)
        self.assertTrue(result['success'])
示例#2
0
文件: ws.py 项目: crudbug/canopsis
    def test_count(self):

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

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

        result = response({1: 1})

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

        result = response([])

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

        result = response(1)

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

        result = response(None)

        self.assertEqual(result['total'], 0)
        self.assertTrue(result['success'])
示例#7
0
文件: ws.py 项目: crudbug/canopsis
    def test_dict(self):

        result = response({1: 1})

        self.assertEqual(result['total'], 1)
        self.assertTrue(result['success'])
示例#8
0
文件: ws.py 项目: crudbug/canopsis
    def test_empty_iterable(self):

        result = response([])

        self.assertEqual(result['total'], 0)
        self.assertTrue(result['success'])
示例#9
0
文件: ws.py 项目: crudbug/canopsis
    def test_simple(self):

        result = response(1)

        self.assertEqual(result['total'], 1)
        self.assertTrue(result['success'])
示例#10
0
文件: ws.py 项目: crudbug/canopsis
    def test_none(self):

        result = response(None)

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