     }
     req.end(close: true)
     
-    waitForExpectations(timeout: 15.0, handler: nil)
+    waitForExpectations(timeout: timeout, handler: nil)
   }
 
 }

        }
        tagExpectation.fulfill()
    }
    waitForExpectations(timeout: 10.0, handler: nil)
  }

  // MARK: Image related tests

        imageExpectation.fulfill()

    }
    waitForExpectations(timeout: timeout, handler: nil)
  }

  func testPostingImage() {
