diff --git a/canvasapi/canvas.py b/canvasapi/canvas.py
index <HASH>..<HASH> 100644
--- a/canvasapi/canvas.py
+++ b/canvasapi/canvas.py
@@ -62,7 +62,7 @@ class Canvas(object):
         # Ensure that the user-supplied access token and base_url contain no leading or
         # trailing spaces that might cause issues when communicating with the API.
         access_token = access_token.strip()
-        base_url = base_url.strip()
+        base_url = new_url.strip()
 
         self.__requester = Requester(base_url, access_token)
 
diff --git a/tests/test_canvas.py b/tests/test_canvas.py
index <HASH>..<HASH> 100644
--- a/tests/test_canvas.py
+++ b/tests/test_canvas.py
@@ -37,7 +37,10 @@ class TestCanvas(unittest.TestCase):
     # Canvas()
     def test_init_deprecate_url_contains_version(self, m):
         with warnings.catch_warnings(record=True) as w:
-            Canvas(settings.BASE_URL_WITH_VERSION, settings.API_KEY)
+            client = Canvas(settings.BASE_URL_WITH_VERSION, settings.API_KEY)
+            self.assertEqual(
+                client._Canvas__requester.base_url, "https://example.com/api/v1/"
+            )
             self.assertTrue(issubclass(w[0].category, DeprecationWarning))
 
     def test_init_warns_when_url_is_http(self, m):
Fix an issue where base_url was being set incorrectly. Added regression test (#<I>)