diff --git a/openstack/db/v1/users/fixtures.go b/openstack/db/v1/users/fixtures.go
index 6bada41..25b75f1 100644
--- a/openstack/db/v1/users/fixtures.go
+++ b/openstack/db/v1/users/fixtures.go
@@ -1,91 +1,21 @@
 package users
 
-import (
-	"fmt"
-	"net/http"
-	"testing"
+import "fmt"
 
-	th "github.com/rackspace/gophercloud/testhelper"
-	fake "github.com/rackspace/gophercloud/testhelper/client"
+const user1 = `
+{"databases": [{"name": "databaseA"}],"name": "dbuser3"%s}
+`
+
+const user2 = `
+{"databases": [{"name": "databaseB"},{"name": "databaseC"}],"name": "dbuser4"%s}
+`
+
+var (
+	pUser1 = fmt.Sprintf(user1, `,"password":"secretsecret"`)
+	pUser2 = fmt.Sprintf(user2, `,"password":"secretsecret"`)
 )
 
-func HandleCreateUserSuccessfully(t *testing.T, instanceID string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "POST")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-		th.TestJSONRequest(t, r, `
-{
-  "users": [
-    {
-      "databases": [
-        {
-          "name": "databaseA"
-        }
-      ],
-      "name": "dbuser3",
-      "password": "secretsecret"
-    },
-    {
-      "databases": [
-        {
-          "name": "databaseB"
-        },
-        {
-          "name": "databaseC"
-        }
-      ],
-      "name": "dbuser4",
-      "password": "secretsecret"
-    }
-  ]
-}
-`)
-
-		w.Header().Set("Content-Type", "application/json")
-		w.WriteHeader(http.StatusAccepted)
-	})
-}
-
-func HandleListUsersSuccessfully(t *testing.T, instanceID string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users", func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "GET")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-
-		w.Header().Set("Content-Type", "application/json")
-		w.WriteHeader(http.StatusOK)
-
-		fmt.Fprintf(w, `
-{
-	"users": [
-		{
-			"databases": [
-				{
-					"name": "databaseA"
-				}
-			],
-			"name": "dbuser3"
-		},
-		{
-			"databases": [
-				{
-					"name": "databaseB"
-				},
-				{
-					"name": "databaseC"
-				}
-			],
-			"name": "dbuser4"
-		}
-	]
-}
-`)
-	})
-}
-
-func HandleDeleteUserSuccessfully(t *testing.T, instanceID, dbName string) {
-	th.Mux.HandleFunc("/instances/"+instanceID+"/users/"+dbName, func(w http.ResponseWriter, r *http.Request) {
-		th.TestMethod(t, r, "DELETE")
-		th.TestHeader(t, r, "X-Auth-Token", fake.TokenID)
-		w.WriteHeader(http.StatusAccepted)
-	})
-}
+var (
+	createReq = fmt.Sprintf(`{"users":[%s, %s]}`, pUser1, pUser2)
+	listResp  = fmt.Sprintf(`{"users":[%s, %s]}`, fmt.Sprintf(user1, ""), fmt.Sprintf(user2, ""))
+)
diff --git a/openstack/db/v1/users/requests_test.go b/openstack/db/v1/users/requests_test.go
index 00c4e58..47eccea 100644
--- a/openstack/db/v1/users/requests_test.go
+++ b/openstack/db/v1/users/requests_test.go
@@ -7,15 +7,18 @@
 	"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 instanceID = "{instanceID}"
+var (
+	instanceID = "{instanceID}"
+	_rootURL   = "/instances/" + instanceID + "/users"
+)
 
 func TestCreate(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleCreateUserSuccessfully(t, instanceID)
+	fixture.SetupHandler(t, _rootURL, "POST", createReq, "", 202)
 
 	opts := BatchCreateOpts{
 		CreateOpts{
@@ -42,8 +45,7 @@
 func TestUserList(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleListUsersSuccessfully(t, instanceID)
+	fixture.SetupHandler(t, _rootURL, "GET", "", listResp, 200)
 
 	expectedUsers := []User{
 		User{
@@ -71,22 +73,17 @@
 		}
 
 		th.CheckDeepEquals(t, expectedUsers, actual)
-
 		return true, nil
 	})
 
 	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) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-
-	HandleDeleteUserSuccessfully(t, instanceID, "{dbName}")
+	fixture.SetupHandler(t, _rootURL+"/{dbName}", "DELETE", "", "", 202)
 
 	res := Delete(fake.ServiceClient(), instanceID, "{dbName}")
 	th.AssertNoErr(t, res.Err)
