       (request :post "/1.x/applications/application/environment/resume")
       => (contains {:status 409})
       (provided
+       (deployments/locked?) => false
        (deployments/paused? {:application "application" :environment "environment" :region "eu-west-1"}) => false))
 
 (fact "that attempting to resume a deployment which is paused gives a 200"
       (request :post "/1.x/applications/application/environment/resume")
       => (contains {:status 200})
       (provided
+       (deployments/locked?) => false
        (deployments/paused? {:application "application" :environment "environment" :region "eu-west-1"}) => true
        (deployments/resume {:application "application" :environment "environment" :region "eu-west-1"}) => anything))
 

                                                                                      :user "user"}))
      => (contains {:status 200})
      (provided
       (util/generate-id) => "id"
       (deployments/rollback {:application "application"
                              :environment "environment"

                                                                                    :user nil}))
      => (contains {:status 200})
      (provided
       (deployments/locked?) => false
       (util/generate-id) => "id"
       (deployments/begin {:application "application"
                           :environment "environment"
