diff --git a/rackspace/db/v1/users/delegate_test.go b/rackspace/db/v1/users/delegate_test.go
index a5da864..c818fe1 100644
--- a/rackspace/db/v1/users/delegate_test.go
+++ b/rackspace/db/v1/users/delegate_test.go
@@ -15,8 +15,7 @@
 func TestCreate(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleCreateUserSuccessfully(t, instanceID)
+	os.HandleCreate(t)
 
 	opts := os.BatchCreateOpts{
 		os.CreateOpts{
@@ -43,8 +42,7 @@
 func TestUserList(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleListUsersSuccessfully(t, instanceID)
+	os.HandleList(t)
 
 	expectedUsers := []os.User{
 		os.User{
@@ -77,17 +75,13 @@
 	})
 
 	th.AssertNoErr(t, err)
-
-	if pages != 1 {
-		t.Errorf("Expected 1 page, saw %d", pages)
-	}
+	th.AssertEquals(t, 1, pages)
 }
 
-func TestDeleteInstance(t *testing.T) {
+func TestDelete(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	os.HandleDeleteUserSuccessfully(t, instanceID, "{userName}")
+	os.HandleDelete(t)
 
 	res := Delete(fake.ServiceClient(), instanceID, "{userName}")
 	th.AssertNoErr(t, res.Err)
diff --git a/rackspace/db/v1/users/fixtures.go b/rackspace/db/v1/users/fixtures.go
index 9fdae69..5388123 100644
--- a/rackspace/db/v1/users/fixtures.go
+++ b/rackspace/db/v1/users/fixtures.go
@@ -1,39 +1,8 @@
 package users
 
-import (
-	"fmt"
-	"net/http"
-	"testing"
-
-	th "github.com/rackspace/gophercloud/testhelper"
-	fake "github.com/rackspace/gophercloud/testhelper/client"
-)
-
 const singleDB = `{"databases": [{"name": "databaseE"}]}`
 
-func setupHandler(t *testing.T, url, method, requestBody, responseBody string, status int) {
-	th.Mux.HandleFunc(url, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, method)
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		if requestBody != "" {
-			th.TestJSONRequest(t, r, requestBody)
-		}
-
-		w.WriteHeader(status)
-
-		if responseBody != "" {
-			w.Header().Add("Content-Type", "application/json")
-			fmt.Fprintf(w, responseBody)
-		}
-	})
-}
-
-func HandleChangePasswordSuccessfully(t *testing.T, instanceID string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "PUT")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-		th.TestJSONRequest(t, r, `
+var changePwdReq = `
 {
   "users": [
     {
@@ -46,74 +15,35 @@
     }
   ]
 }
-`)
+`
 
-		w.Header().Set("Content-Type", "application/json")
-		w.WriteHeader(http.StatusAccepted)
-	})
-}
-
-func HandleUpdateSuccessfully(t *testing.T, instanceID, userName string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users/"+userName, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "PUT")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-		th.TestJSONRequest(t, r, `
+var updateReq = `
 {
-  "user": {
-    "name": "new_username",
-    "password": "new_password"
-  }
+	"user": {
+		"name": "new_username",
+		"password": "new_password"
+	}
 }
-`)
+`
 
-		w.Header().Set("Content-Type", "application/json")
-		w.WriteHeader(http.StatusAccepted)
-	})
-}
-
-func HandleGetSuccessfully(t *testing.T, instanceID, userName string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users/"+userName, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, `
+var getResp = `
 {
-  "user": {
-    "name": "exampleuser",
-    "host": "foo",
-    "databases": [
-      {
-        "name": "databaseA"
-      },
-      {
-        "name": "databaseB"
-      }
-    ]
-  }
+	"user": {
+		"name": "exampleuser",
+		"host": "foo",
+		"databases": [
+			{
+				"name": "databaseA"
+			},
+			{
+				"name": "databaseB"
+			}
+		]
+	}
 }
-`)
-	})
-}
+`
 
-func HandleListUserAccessSuccessfully(t *testing.T, instanceID, userName string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users/"+userName+"/databases", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Add("Content-Type", "application/json")
-
-		fmt.Fprintf(w, singleDB)
-	})
-}
-
-func HandleGrantUserAccessSuccessfully(t *testing.T, instanceID, userName string) {
-	url := "/instances/" + instanceID + "/users/" + userName + "/databases"
-	setupHandler(t, url, "PUT", singleDB, "", http.StatusAccepted)
-}
-
-func HandleRevokeUserAccessSuccessfully(t *testing.T, instanceID, userName, dbName string) {
-	url := "/instances/" + instanceID + "/users/" + userName + "/databases/" + dbName
-	setupHandler(t, url, "DELETE", "", "", http.StatusAccepted)
-}
+var (
+	listUserAccessResp = singleDB
+	grantUserAccessReq = singleDB
+)
diff --git a/rackspace/db/v1/users/requests_test.go b/rackspace/db/v1/users/requests_test.go
index 17de21d..f18492d 100644
--- a/rackspace/db/v1/users/requests_test.go
+++ b/rackspace/db/v1/users/requests_test.go
@@ -8,15 +8,20 @@
 	"github.com/rackspace/gophercloud/pagination"
 	th "github.com/rackspace/gophercloud/testhelper"
 	fake "github.com/rackspace/gophercloud/testhelper/client"
+	"github.com/rackspace/gophercloud/testhelper/fixture"
 )
 
-const userName = "{userName}"
+var (
+	userName = "{userName}"
+	_rootURL = "/instances/" + instanceID + "/users"
+	_userURL = _rootURL + "/" + userName
+	_dbURL   = _userURL + "/databases"
+)
 
 func TestChangeUserPassword(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleChangePasswordSuccessfully(t, instanceID)
+	fixture.SetupHandler(t, _rootURL, "PUT", changePwdReq, "", 202)
 
 	opts := os.BatchCreateOpts{
 		os.CreateOpts{Name: "dbuser1", Password: "newpassword"},
@@ -24,15 +29,13 @@
 	}
 
 	err := ChangePassword(fake.ServiceClient(), instanceID, opts).ExtractErr()
-
 	th.AssertNoErr(t, err)
 }
 
 func TestUpdateUser(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleUpdateSuccessfully(t, instanceID, userName)
+	fixture.SetupHandler(t, _userURL, "PUT", updateReq, "", 202)
 
 	opts := os.CreateOpts{
 		Name:     "new_username",
@@ -40,15 +43,13 @@
 	}
 
 	err := Update(fake.ServiceClient(), instanceID, userName, opts).ExtractErr()
-
 	th.AssertNoErr(t, err)
 }
 
 func TestGetUser(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleGetSuccessfully(t, instanceID, userName)
+	fixture.SetupHandler(t, _userURL, "GET", "", getResp, 200)
 
 	user, err := Get(fake.ServiceClient(), instanceID, userName).Extract()
 
@@ -69,8 +70,7 @@
 func TestUserAccessList(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleListUserAccessSuccessfully(t, instanceID, userName)
+	fixture.SetupHandler(t, _userURL+"/databases", "GET", "", listUserAccessResp, 200)
 
 	expectedDBs := []db.Database{
 		db.Database{Name: "databaseE"},
@@ -91,22 +91,15 @@
 	})
 
 	th.AssertNoErr(t, err)
-
-	if pages != 1 {
-		t.Errorf("Expected 1 page, saw %d", pages)
-	}
+	th.AssertEquals(t, 1, pages)
 }
 
 func TestGrantAccess(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
+	fixture.SetupHandler(t, _dbURL, "PUT", grantUserAccessReq, "", 202)
 
-	HandleGrantUserAccessSuccessfully(t, instanceID, userName)
-
-	opts := db.BatchCreateOpts{
-		db.CreateOpts{Name: "databaseE"},
-	}
-
+	opts := db.BatchCreateOpts{db.CreateOpts{Name: "databaseE"}}
 	err := GrantAccess(fake.ServiceClient(), instanceID, userName, opts).ExtractErr()
 	th.AssertNoErr(t, err)
 }
@@ -114,8 +107,7 @@
 func TestRevokeAccess(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleRevokeUserAccessSuccessfully(t, instanceID, userName, "{dbName}")
+	fixture.SetupHandler(t, _dbURL+"/{dbName}", "DELETE", "", "", 202)
 
 	err := RevokeAccess(fake.ServiceClient(), instanceID, userName, "{dbName}").ExtractErr()
 	th.AssertNoErr(t, err)
