diff --git a/acceptance/openstack/networking/v2/apiversion_test.go b/acceptance/openstack/networking/v2/apiversion_test.go
new file mode 100644
index 0000000..79198c5
--- /dev/null
+++ b/acceptance/openstack/networking/v2/apiversion_test.go
@@ -0,0 +1,51 @@
+// +build acceptance networking
+
+package v2
+
+import (
+	"testing"
+
+	"github.com/rackspace/gophercloud"
+	"github.com/rackspace/gophercloud/openstack/networking/v2/apiversions"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestListAPIVersions(t *testing.T) {
+	Setup(t)
+	defer Teardown()
+
+	pager := apiversions.ListVersions(Client)
+	err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+		t.Logf("--- Page ---")
+
+		versions, err := apiversions.ExtractAPIVersions(page)
+		th.AssertNoErr(t, err)
+
+		for _, v := range versions {
+			t.Logf("API Version: ID [%s] Status [%s]", v.ID, v.Status)
+		}
+
+		return true, nil
+	})
+	th.CheckNoErr(t, err)
+}
+
+func TestListAPIResources(t *testing.T) {
+	Setup(t)
+	defer Teardown()
+
+	pager := apiversions.ListVersionResources(Client, "v2.0")
+	err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+		t.Logf("--- Page ---")
+
+		vrs, err := apiversions.ExtractVersionResources(page)
+		th.AssertNoErr(t, err)
+
+		for _, vr := range vrs {
+			t.Logf("Network: Name [%s] Collection [%s]", vr.Name, vr.Collection)
+		}
+
+		return true, nil
+	})
+	th.CheckNoErr(t, err)
+}
diff --git a/acceptance/openstack/networking/v2/extension_test.go b/acceptance/openstack/networking/v2/extension_test.go
new file mode 100644
index 0000000..2cbe3a7
--- /dev/null
+++ b/acceptance/openstack/networking/v2/extension_test.go
@@ -0,0 +1,45 @@
+// +build acceptance networking
+
+package v2
+
+import (
+	"testing"
+
+	"github.com/rackspace/gophercloud"
+	"github.com/rackspace/gophercloud/openstack/networking/v2/extensions"
+	th "github.com/rackspace/gophercloud/testhelper"
+)
+
+func TestListExts(t *testing.T) {
+	Setup(t)
+	defer Teardown()
+
+	pager := extensions.List(Client)
+	err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+		t.Logf("--- Page ---")
+
+		exts, err := extensions.ExtractExtensions(page)
+		th.AssertNoErr(t, err)
+
+		for _, ext := range exts {
+			t.Logf("Extension: Name [%s] Description [%s]", ext.Name, ext.Description)
+		}
+
+		return true, nil
+	})
+	th.CheckNoErr(t, err)
+}
+
+func TestGetExt(t *testing.T) {
+	Setup(t)
+	defer Teardown()
+
+	ext, err := extensions.Get(Client, "service-type")
+	th.AssertNoErr(t, err)
+
+	th.AssertEquals(t, ext.Updated, "2013-01-20T00:00:00-00:00")
+	th.AssertEquals(t, ext.Name, "Neutron Service Type Management")
+	th.AssertEquals(t, ext.Namespace, "http://docs.openstack.org/ext/neutron/service-type/api/v1.0")
+	th.AssertEquals(t, ext.Alias, "service-type")
+	th.AssertEquals(t, ext.Description, "API for retrieving service providers for Neutron advanced services")
+}
diff --git a/acceptance/openstack/networking/v2/network_test.go b/acceptance/openstack/networking/v2/network_test.go
index 53b9f59..6eb7182 100644
--- a/acceptance/openstack/networking/v2/network_test.go
+++ b/acceptance/openstack/networking/v2/network_test.go
@@ -4,6 +4,7 @@
 
 import (
 	"os"
+	"strconv"
 	"testing"
 
 	"github.com/rackspace/gophercloud"
@@ -13,9 +14,7 @@
 	th "github.com/rackspace/gophercloud/testhelper"
 )
 
-var (
-	Client *gophercloud.ServiceClient
-)
+var Client *gophercloud.ServiceClient
 
 func NewClient() (*gophercloud.ServiceClient, error) {
 	opts, err := utils.AuthOptions()
@@ -44,60 +43,25 @@
 	Client = nil
 }
 
-func TestListAPIVersions(t *testing.T) {
-	Setup(t)
-	defer Teardown()
-
-	res, err := networks.APIVersions(Client)
-	th.AssertNoErr(t, err)
-
-	err = gophercloud.EachPage(res, func(page gophercloud.Collection) bool {
-		t.Logf("--- Page ---")
-		for _, v := range networks.ToAPIVersions(page) {
-			t.Logf("API version: ID [%s] Status [%s]", v.ID, v.Status)
-		}
-		return true
-	})
-	th.AssertNoErr(t, err)
-}
-
-func TestGetApiInfo(t *testing.T) {
-	Setup(t)
-	defer Teardown()
-
-	res, err := networks.APIInfo(Client, "v2.0")
-	th.AssertNoErr(t, err)
-
-	err = gophercloud.EachPage(res, func(page gophercloud.Collection) bool {
-		t.Logf("--- Page ---")
-		for _, r := range networks.ToAPIResource(page) {
-			t.Logf("API resource: Name [%s] Collection [%s]", r.Name, r.Collection)
-		}
-		return true
-	})
-	th.AssertNoErr(t, err)
-}
-
-func TestListExts(t *testing.T) {
-	//networks.Extensions()
-}
-
-func TestGetExt(t *testing.T) {
-	Setup(t)
-	defer Teardown()
-
-	ext, err := networks.GetExtension(Client, "service-type")
-	th.AssertNoErr(t, err)
-
-	th.AssertEquals(t, ext.Updated, "2013-01-20T00:00:00-00:00")
-	th.AssertEquals(t, ext.Name, "Neutron Service Type Management")
-	th.AssertEquals(t, ext.Namespace, "http://docs.openstack.org/ext/neutron/service-type/api/v1.0")
-	th.AssertEquals(t, ext.Alias, "service-type")
-	th.AssertEquals(t, ext.Description, "API for retrieving service providers for Neutron advanced services")
-}
-
 func TestListNetworks(t *testing.T) {
-	//networks.List()
+	Setup(t)
+	defer Teardown()
+
+	pager := networks.List(Client, networks.ListOpts{})
+	err := pager.EachPage(func(page gophercloud.Page) (bool, error) {
+		t.Logf("--- Page ---")
+
+		networks, err := networks.ExtractNetworks(page)
+		th.AssertNoErr(t, err)
+
+		for _, n := range networks {
+			t.Logf("Network: ID [%s] Name [%s] Status [%s] Is shared? [%s]",
+				n.ID, n.Name, n.Status, strconv.FormatBool(n.Shared))
+		}
+
+		return true, nil
+	})
+	th.CheckNoErr(t, err)
 }
 
 func TestNetworkCRUDOperations(t *testing.T) {
@@ -134,7 +98,7 @@
 	th.AssertEquals(t, n.Name, "new_network_name")
 
 	// Delete network
-	err := networks.Delete(Client, networkID)
+	err = networks.Delete(Client, networkID)
 	th.AssertNoErr(t, err)
 }
 
