      (doseq [[item record] (mapv vector items records)]
        (expect {:old-image {}
                 :new-image item} (in record))))
-  )+  )


;;;; Expressions support

(let [i {:id 10 :name "update me"}]
  (after-setup!
   #(far/delete-item *client-opts* ttable {:id 10}))

  (expect ; Update expression support in update-item
   {:id 10 :name "foo"}
   (do
     (far/update-item *client-opts* ttable
       {:id 10}
       {:update-expr     "SET #name = :name"
        :expr-attr-names {"#name" "name"}
        :expr-attr-vals  {":name" "foo"}
        :return          :all-new})))

  (expect ; We can add a set item
    {:id 10 :name "foo" :someset #{"a" "b" "c"}}
    (do
      (far/update-item *client-opts* ttable
                       {:id 10}
                       {:update-expr     "SET someset = :toset"

                        :return          :all-new})))

  (expect ; We can remove elements from a set
    {:id 10  :someset #{"a" "c" "e" "f"}}
    (do
      (far/delete-item *client-opts* ttable {:id 10})
      (far/put-item *client-opts* ttable  abcdef-set)
      (far/update-item *client-opts* ttable
                       {:id 10}
                       {:update-expr     "DELETE someset :todel"
                        :expr-attr-vals  {":todel" #{"b" "d"}}
                        :return          :all-new}))))

(let [items [{:id 11 :name "eleven" :test "batch"}
             {:id 12 :name "twelve" :test "batch"}
