diff --git a/acceptance/openstack/compute/v2/quotaset_test.go b/acceptance/openstack/compute/v2/quotaset_test.go
index d7883df..60b8563 100644
--- a/acceptance/openstack/compute/v2/quotaset_test.go
+++ b/acceptance/openstack/compute/v2/quotaset_test.go
@@ -1,60 +1,69 @@
-// +build acceptance compute
+// +build acceptance compute quotasets
 
 package v2
 
 import (
+	"fmt"
 	"testing"
 
 	"github.com/gophercloud/gophercloud"
-	"github.com/gophercloud/gophercloud/openstack"
 	"github.com/gophercloud/gophercloud/openstack/compute/v2/extensions/quotasets"
 	"github.com/gophercloud/gophercloud/openstack/identity/v2/tenants"
-	"github.com/gophercloud/gophercloud/pagination"
-	th "github.com/gophercloud/gophercloud/testhelper"
 )
 
-func TestGetQuotaset(t *testing.T) {
+func TestQuotasetGet(t *testing.T) {
 	client, err := newClient()
 	if err != nil {
 		t.Fatalf("Unable to create a compute client: %v", err)
 	}
 
-	idclient := openstack.NewIdentityV2(client.ProviderClient)
-	quotaset, err := quotasets.Get(client, findTenant(t, idclient)).Extract()
+	identityClient, err := newIdentityClient()
+	if err != nil {
+		t.Fatalf("Unable to get a new identity client: %v", err)
+	}
+
+	tenantID, err := getTenantID(t, identityClient)
 	if err != nil {
 		t.Fatal(err)
 	}
 
-	t.Logf("QuotaSet details:\n")
-	t.Logf("                   instances=[%d]\n", quotaset.Instances)
-	t.Logf("                       cores=[%d]\n", quotaset.Cores)
-	t.Logf("                         ram=[%d]\n", quotaset.Ram)
-	t.Logf("                   key_pairs=[%d]\n", quotaset.KeyPairs)
-	t.Logf("              metadata_items=[%d]\n", quotaset.MetadataItems)
-	t.Logf("             security_groups=[%d]\n", quotaset.SecurityGroups)
-	t.Logf("        security_group_rules=[%d]\n", quotaset.SecurityGroupRules)
-	t.Logf("                   fixed_ips=[%d]\n", quotaset.FixedIps)
-	t.Logf("                floating_ips=[%d]\n", quotaset.FloatingIps)
-	t.Logf(" injected_file_content_bytes=[%d]\n", quotaset.InjectedFileContentBytes)
-	t.Logf("    injected_file_path_bytes=[%d]\n", quotaset.InjectedFilePathBytes)
-	t.Logf("              injected_files=[%d]\n", quotaset.InjectedFiles)
+	quotaSet, err := quotasets.Get(client, tenantID).Extract()
+	if err != nil {
+		t.Fatal(err)
+	}
 
+	printQuotaSet(t, quotaSet)
 }
 
-func findTenant(t *testing.T, client *gophercloud.ServiceClient) string {
-	var tenantID string
-	err := tenants.List(client, nil).EachPage(func(page pagination.Page) (bool, error) {
-		tenantList, err := tenants.ExtractTenants(page)
-		th.AssertNoErr(t, err)
+func getTenantID(t *testing.T, client *gophercloud.ServiceClient) (string, error) {
+	allPages, err := tenants.List(client, nil).AllPages()
+	if err != nil {
+		t.Fatalf("Unable to get list of tenants: %v", err)
+	}
 
-		for _, t := range tenantList {
-			tenantID = t.ID
-			break
-		}
+	allTenants, err := tenants.ExtractTenants(allPages)
+	if err != nil {
+		t.Fatalf("Unable to extract tenants: %v", err)
+	}
 
-		return true, nil
-	})
-	th.AssertNoErr(t, err)
+	for _, tenant := range allTenants {
+		return tenant.ID, nil
+	}
 
-	return tenantID
+	return "", fmt.Errorf("Unable to get tenant ID")
+}
+
+func printQuotaSet(t *testing.T, quotaSet *quotasets.QuotaSet) {
+	t.Logf("instances: %d\n", quotaSet.Instances)
+	t.Logf("cores: %d\n", quotaSet.Cores)
+	t.Logf("ram: %d\n", quotaSet.Ram)
+	t.Logf("key_pairs: %d\n", quotaSet.KeyPairs)
+	t.Logf("metadata_items: %d\n", quotaSet.MetadataItems)
+	t.Logf("security_groups: %d\n", quotaSet.SecurityGroups)
+	t.Logf("security_group_rules: %d\n", quotaSet.SecurityGroupRules)
+	t.Logf("fixed_ips: %d\n", quotaSet.FixedIps)
+	t.Logf("floating_ips: %d\n", quotaSet.FloatingIps)
+	t.Logf("injected_file_content_bytes: %d\n", quotaSet.InjectedFileContentBytes)
+	t.Logf("injected_file_path_bytes: %d\n", quotaSet.InjectedFilePathBytes)
+	t.Logf("injected_files: %d\n", quotaSet.InjectedFiles)
 }
