diff --git a/rackspace/db/v1/configurations/delegate_test.go b/rackspace/db/v1/configurations/delegate_test.go
index af5e8aa..580f02a 100644
--- a/rackspace/db/v1/configurations/delegate_test.go
+++ b/rackspace/db/v1/configurations/delegate_test.go
@@ -28,7 +28,7 @@
 func TestList(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, _baseURL, "GET", "", os.ListConfigsJSON, 200)
+	fixture.SetupHandler(t, _baseURL, "GET", "", listConfigsJSON, 200)
 
 	count := 0
 	err := List(fake.ServiceClient()).EachPage(func(page pagination.Page) (bool, error) {
@@ -36,7 +36,7 @@
 		actual, err := os.ExtractConfigs(page)
 		th.AssertNoErr(t, err)
 
-		expected := []os.Config{os.ExampleConfig}
+		expected := []os.Config{exampleConfig}
 		th.AssertDeepEquals(t, expected, actual)
 
 		return true, nil
@@ -49,17 +49,17 @@
 func TestGet(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "GET", "", os.GetConfigJSON, 200)
+	fixture.SetupHandler(t, resURL, "GET", "", getConfigJSON, 200)
 
 	config, err := Get(fake.ServiceClient(), configID).Extract()
 	th.AssertNoErr(t, err)
-	th.AssertDeepEquals(t, &os.ExampleConfig, config)
+	th.AssertDeepEquals(t, &exampleConfig, config)
 }
 
 func TestCreate(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, _baseURL, "POST", os.CreateReq, os.CreateConfigJSON, 200)
+	fixture.SetupHandler(t, _baseURL, "POST", createReq, createConfigJSON, 200)
 
 	opts := os.CreateOpts{
 		Datastore: &os.DatastoreOpts{
@@ -76,13 +76,13 @@
 
 	config, err := Create(fake.ServiceClient(), opts).Extract()
 	th.AssertNoErr(t, err)
-	th.AssertDeepEquals(t, &os.ExampleConfigWithValues, config)
+	th.AssertDeepEquals(t, &exampleConfigWithValues, config)
 }
 
 func TestUpdate(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "PATCH", os.UpdateReq, "", 200)
+	fixture.SetupHandler(t, resURL, "PATCH", updateReq, "", 200)
 
 	opts := os.UpdateOpts{
 		Values: map[string]interface{}{
@@ -97,7 +97,7 @@
 func TestReplace(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL, "PUT", os.UpdateReq, "", 202)
+	fixture.SetupHandler(t, resURL, "PUT", updateReq, "", 202)
 
 	opts := os.UpdateOpts{
 		Values: map[string]interface{}{
@@ -121,7 +121,7 @@
 func TestListInstances(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, resURL+"/instances", "GET", "", os.ListInstancesJSON, 200)
+	fixture.SetupHandler(t, resURL+"/instances", "GET", "", listInstancesJSON, 200)
 
 	expectedInstance := instances.Instance{
 		ID:   "d4603f69-ec7e-4e9b-803f-600b9205576f",
@@ -149,7 +149,7 @@
 func TestListDSParams(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, dsParamListURL, "GET", "", os.ListParamsJSON, 200)
+	fixture.SetupHandler(t, dsParamListURL, "GET", "", listParamsJSON, 200)
 
 	pages := 0
 	err := ListDatastoreParams(fake.ServiceClient(), dsID, versionID).EachPage(func(page pagination.Page) (bool, error) {
@@ -179,7 +179,7 @@
 func TestGetDSParam(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, dsParamGetURL, "GET", "", os.GetParamJSON, 200)
+	fixture.SetupHandler(t, dsParamGetURL, "GET", "", getParamJSON, 200)
 
 	param, err := GetDatastoreParam(fake.ServiceClient(), dsID, versionID, paramID).Extract()
 	th.AssertNoErr(t, err)
@@ -194,7 +194,7 @@
 func TestListGlobalParams(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, globalParamListURL, "GET", "", os.ListParamsJSON, 200)
+	fixture.SetupHandler(t, globalParamListURL, "GET", "", listParamsJSON, 200)
 
 	pages := 0
 	err := ListGlobalParams(fake.ServiceClient(), versionID).EachPage(func(page pagination.Page) (bool, error) {
@@ -224,7 +224,7 @@
 func TestGetGlobalParam(t *testing.T) {
 	th.SetupHTTP()
 	defer th.TeardownHTTP()
-	fixture.SetupHandler(t, globalParamGetURL, "GET", "", os.GetParamJSON, 200)
+	fixture.SetupHandler(t, globalParamGetURL, "GET", "", getParamJSON, 200)
 
 	param, err := GetGlobalParam(fake.ServiceClient(), versionID, paramID).Extract()
 	th.AssertNoErr(t, err)
diff --git a/rackspace/db/v1/configurations/fixtures.go b/rackspace/db/v1/configurations/fixtures.go
new file mode 100644
index 0000000..aeacb0e
--- /dev/null
+++ b/rackspace/db/v1/configurations/fixtures.go
@@ -0,0 +1,153 @@
+package configurations
+
+import (
+	"fmt"
+
+	os "github.com/rackspace/gophercloud/openstack/db/v1/configurations"
+)
+
+const singleConfigJSON = `
+{
+  "created": "2014-07-31T18:56:09",
+  "datastore_name": "mysql",
+  "datastore_version_id": "b00000b0-00b0-0b00-00b0-000b000000bb",
+  "datastore_version_name": "5.6",
+  "description": "example_description",
+  "id": "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
+  "name": "example-configuration-name",
+  "updated": "2014-07-31T18:56:09"
+}
+`
+
+const singleConfigWithValuesJSON = `
+{
+  "created": "2014-07-31T15:02:52",
+  "datastore_name": "mysql",
+  "datastore_version_id": "b00000b0-00b0-0b00-00b0-000b000000bb",
+  "datastore_version_name": "5.6",
+  "description": "example description",
+  "id": "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
+  "instance_count": 0,
+  "name": "example-configuration-name",
+  "updated": "2014-07-31T15:02:52",
+  "values": {
+    "collation_server": "latin1_swedish_ci",
+    "connect_timeout": 120
+  }
+}
+`
+
+var (
+	listConfigsJSON  = fmt.Sprintf(`{"configurations": [%s]}`, singleConfigJSON)
+	getConfigJSON    = fmt.Sprintf(`{"configuration": %s}`, singleConfigJSON)
+	createConfigJSON = fmt.Sprintf(`{"configuration": %s}`, singleConfigWithValuesJSON)
+)
+
+var createReq = `
+{
+  "configuration": {
+    "datastore": {
+      "type": "a00000a0-00a0-0a00-00a0-000a000000aa",
+      "version": "b00000b0-00b0-0b00-00b0-000b000000bb"
+    },
+    "description": "example description",
+    "name": "example-configuration-name",
+    "values": {
+      "collation_server": "latin1_swedish_ci",
+      "connect_timeout": 120
+    }
+  }
+}
+`
+
+var updateReq = `
+{
+  "configuration": {
+    "values": {
+      "connect_timeout": 300
+    }
+  }
+}
+`
+
+var listInstancesJSON = `
+{
+  "instances": [
+    {
+      "id": "d4603f69-ec7e-4e9b-803f-600b9205576f",
+      "name": "json_rack_instance"
+    }
+  ]
+}
+`
+
+var listParamsJSON = `
+{
+  "configuration-parameters": [
+    {
+      "max": 1,
+      "min": 0,
+      "name": "innodb_file_per_table",
+      "restart_required": true,
+      "type": "integer"
+    },
+    {
+      "max": 4294967296,
+      "min": 0,
+      "name": "key_buffer_size",
+      "restart_required": false,
+      "type": "integer"
+    },
+    {
+      "max": 65535,
+      "min": 2,
+      "name": "connect_timeout",
+      "restart_required": false,
+      "type": "integer"
+    },
+    {
+      "max": 4294967296,
+      "min": 0,
+      "name": "join_buffer_size",
+      "restart_required": false,
+      "type": "integer"
+    }
+  ]
+}
+`
+
+var getParamJSON = `
+{
+  "max": 1,
+  "min": 0,
+  "name": "innodb_file_per_table",
+  "restart_required": true,
+  "type": "integer"
+}
+`
+
+var exampleConfig = os.Config{
+	Created:              "2014-07-31T18:56:09",
+	DatastoreName:        "mysql",
+	DatastoreVersionID:   "b00000b0-00b0-0b00-00b0-000b000000bb",
+	DatastoreVersionName: "5.6",
+	Description:          "example_description",
+	ID:                   "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
+	Name:                 "example-configuration-name",
+	Updated:              "2014-07-31T18:56:09",
+}
+
+var exampleConfigWithValues = os.Config{
+	Created:              "2014-07-31T15:02:52",
+	DatastoreName:        "mysql",
+	DatastoreVersionID:   "b00000b0-00b0-0b00-00b0-000b000000bb",
+	DatastoreVersionName: "5.6",
+	Description:          "example description",
+	ID:                   "005a8bb7-a8df-40ee-b0b7-fc144641abc2",
+	Name:                 "example-configuration-name",
+	Updated:              "2014-07-31T15:02:52",
+	Values: map[string]interface{}{
+		"collation_server": "latin1_swedish_ci",
+		"connect_timeout":  120,
+	},
+}
