diff --git a/acceptance/openstack/compute/v2/defsecrules_test.go b/acceptance/openstack/compute/v2/defsecrules_test.go
new file mode 100644
index 0000000..dbee8e3
--- /dev/null
+++ b/acceptance/openstack/compute/v2/defsecrules_test.go
@@ -0,0 +1,105 @@
+// +build acceptance compute defsecrules
+
+package v2
+
+import (
+	"testing"
+
+	"github.com/gophercloud/gophercloud"
+	"github.com/gophercloud/gophercloud/acceptance/tools"
+	dsr "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/defsecrules"
+)
+
+func TestDefSecRulesList(t *testing.T) {
+	client, err := newClient()
+	if err != nil {
+		t.Fatalf("Unable to create a compute client: %v", err)
+	}
+
+	allPages, err := dsr.List(client).AllPages()
+	if err != nil {
+		t.Fatalf("Unable to list default rules: %v", err)
+	}
+
+	allDefaultRules, err := dsr.ExtractDefaultRules(allPages)
+	if err != nil {
+		t.Fatalf("Unable to extract default rules: %v", err)
+	}
+
+	for _, defaultRule := range allDefaultRules {
+		printDefaultRule(t, &defaultRule)
+	}
+}
+
+func TestDefSecRulesCreate(t *testing.T) {
+	client, err := newClient()
+	if err != nil {
+		t.Fatalf("Unable to create a compute client: %v", err)
+	}
+
+	defaultRule, err := createDefaultRule(t, client)
+	if err != nil {
+		t.Fatalf("Unable to create default rule: %v", err)
+	}
+	defer deleteDefaultRule(t, client, defaultRule)
+
+	printDefaultRule(t, &defaultRule)
+}
+
+func TestDefSecRulesGet(t *testing.T) {
+	client, err := newClient()
+	if err != nil {
+		t.Fatalf("Unable to create a compute client: %v", err)
+	}
+
+	defaultRule, err := createDefaultRule(t, client)
+	if err != nil {
+		t.Fatalf("Unable to create default rule: %v", err)
+	}
+	defer deleteDefaultRule(t, client, defaultRule)
+
+	newDefaultRule, err := dsr.Get(client, defaultRule.ID).Extract()
+	if err != nil {
+		t.Fatalf("Unable to get default rule %s: %v", defaultRule.ID, err)
+	}
+
+	printDefaultRule(t, newDefaultRule)
+}
+
+func createDefaultRule(t *testing.T, client *gophercloud.ServiceClient) (dsr.DefaultRule, error) {
+	createOpts := dsr.CreateOpts{
+		FromPort:   tools.RandomInt(80, 89),
+		ToPort:     tools.RandomInt(90, 99),
+		IPProtocol: "TCP",
+		CIDR:       "0.0.0.0/0",
+	}
+
+	defaultRule, err := dsr.Create(client, createOpts).Extract()
+	if err != nil {
+		return *defaultRule, err
+	}
+
+	t.Logf("Created default rule: %s", defaultRule.ID)
+
+	return *defaultRule, nil
+}
+
+func deleteDefaultRule(t *testing.T, client *gophercloud.ServiceClient, defaultRule dsr.DefaultRule) {
+	err := dsr.Delete(client, defaultRule.ID).ExtractErr()
+	if err != nil {
+		t.Fatalf("Unable to delete default rule %s: %v", defaultRule.ID, err)
+	}
+
+	t.Logf("Deleted default rule: %s", defaultRule.ID)
+}
+
+func printDefaultRule(t *testing.T, defaultRule *dsr.DefaultRule) {
+	t.Logf("\tID: %s", defaultRule.ID)
+	t.Logf("\tFrom Port: %d", defaultRule.FromPort)
+	t.Logf("\tTo Port: %d", defaultRule.ToPort)
+	t.Logf("\tIP Protocol: %s", defaultRule.IPProtocol)
+	t.Logf("\tIP Range: %s", defaultRule.IPRange.CIDR)
+	t.Logf("\tParent Group ID: %s", defaultRule.ParentGroupID)
+	t.Logf("\tGroup Tenant ID: %s", defaultRule.Group.TenantID)
+	t.Logf("\tGroup Name: %s", defaultRule.Group.Name)
+}
diff --git a/acceptance/openstack/compute/v2/secdefrules_test.go b/acceptance/openstack/compute/v2/secdefrules_test.go
deleted file mode 100644
index 15809e2..0000000
--- a/acceptance/openstack/compute/v2/secdefrules_test.go
+++ /dev/null
@@ -1,72 +0,0 @@
-// +build acceptance compute defsecrules
-
-package v2
-
-import (
-	"testing"
-
-	"github.com/gophercloud/gophercloud"
-	"github.com/gophercloud/gophercloud/acceptance/tools"
-	dsr "github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/defsecrules"
-	"github.com/gophercloud/gophercloud/pagination"
-	th "github.com/gophercloud/gophercloud/testhelper"
-)
-
-func TestSecDefRules(t *testing.T) {
-	client, err := newClient()
-	th.AssertNoErr(t, err)
-
-	id := createDefRule(t, client)
-
-	listDefRules(t, client)
-
-	getDefRule(t, client, id)
-
-	deleteDefRule(t, client, id)
-}
-
-func createDefRule(t *testing.T, client *gophercloud.ServiceClient) string {
-	opts := dsr.CreateOpts{
-		FromPort:   tools.RandomInt(80, 89),
-		ToPort:     tools.RandomInt(90, 99),
-		IPProtocol: "TCP",
-		CIDR:       "0.0.0.0/0",
-	}
-
-	rule, err := dsr.Create(client, opts).Extract()
-	th.AssertNoErr(t, err)
-
-	t.Logf("Created default rule %s", rule.ID)
-
-	return rule.ID
-}
-
-func listDefRules(t *testing.T, client *gophercloud.ServiceClient) {
-	err := dsr.List(client).EachPage(func(page pagination.Page) (bool, error) {
-		drList, err := dsr.ExtractDefaultRules(page)
-		th.AssertNoErr(t, err)
-
-		for _, dr := range drList {
-			t.Logf("Listing default rule %s: Name [%s] From Port [%s] To Port [%s] Protocol [%s]",
-				dr.ID, dr.FromPort, dr.ToPort, dr.IPProtocol)
-		}
-
-		return true, nil
-	})
-
-	th.AssertNoErr(t, err)
-}
-
-func getDefRule(t *testing.T, client *gophercloud.ServiceClient, id string) {
-	rule, err := dsr.Get(client, id).Extract()
-	th.AssertNoErr(t, err)
-
-	t.Logf("Getting rule %s: %#v", id, rule)
-}
-
-func deleteDefRule(t *testing.T, client *gophercloud.ServiceClient, id string) {
-	err := dsr.Delete(client, id).ExtractErr()
-	th.AssertNoErr(t, err)
-
-	t.Logf("Deleted rule %s", id)
-}
