Exemplo n.º 1
0
    def test_scalar(self):
        result = self._fixture()

        eq_(result.scalar(), 1)

        # note this is a behavior change in 1.4.27 due to
        # adding a real result.close() to Result, previously this would
        # return an empty list.  this is already the
        # behavior with CursorResult, but was mis-implemented for
        # other non-cursor result sets.
        assert_raises(exc.ResourceClosedError, result.all)
Exemplo n.º 2
0
    def test_scalar(self):
        result = self._fixture()

        eq_(result.scalar(), 1)

        eq_(result.all(), [])