Пример #1
0
    def test_init(self, mock_client):
        x_client = mock.Mock()
        mock_client.return_value = x_client
        data = mock.Mock()

        c = wsgi.Controller(data)

        self.assertEqual(data, c.options)
        self.assertEqual(x_client, c.rpc_client)
Пример #2
0
    def test_default(self):
        data = mock.Mock()
        c = wsgi.Controller(data)

        self.assertRaises(webob.exc.HTTPNotFound, c.default, mock.Mock())