def test_always_continue_query(self):
        """Regression test.
        If result has no items but does have LastEvaluatedKey, keep querying.
        """
        conn = MagicMock()
        conn.dynamizer.decode_keys.side_effect = lambda x: x
        items = ["a", "b"]
        results = [
            {"Items": [], "LastEvaluatedKey": {"foo": 1, "bar": 2}},
            {"Items": [], "LastEvaluatedKey": {"foo": 1, "bar": 2}},
            {"Items": items},
        ]
        conn.call.side_effect = lambda *_, **__: results.pop(0)
        rs = ResultSet(conn, Limit())
        results = list(rs)
        self.assertEqual(results, items)