Repository: mockingbirdconsulting/pychirp

Issue:
Loraserver.io has changed its name to Chirpstack
We need to update as well, so we'll go all out and rename the project to `pychirp` at the same time.

Discussion:

Patch:
diff --git a/Jenkinsfile b/Jenkinsfile
index 738244e..ec763d0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -28,7 +28,7 @@ pipeline {
             }
             steps {
                 sh  'python3 setup.py bdist_wheel  '
-                stash includes: "dist/**.whl", name: 'pyloraserver-wheel'
+                stash includes: "dist/**.whl", name: 'pychirp-wheel'
             }
             post {
                 always {
@@ -53,7 +53,7 @@ pipeline {
                 PYPI_TEST = credentials('01b30226-ad41-4ba7-ae90-728d683c3318')
             }
             steps {
-                unstash 'pyloraserver-wheel'
+                unstash 'pychirp-wheel'
                 sh 'pip3 install -r dev_requirements.txt' 
                 sh 'python3 -m twine upload -u ${PYPI_TEST_USR} -p ${PYPI_TEST_PSW} --repository-url https://test.pypi.org/legacy/ **/*.whl'
             }
@@ -71,7 +71,7 @@ pipeline {
                 PYPI_TEST = credentials('01b30226-ad41-4ba7-ae90-728d683c3318')
             }
             steps {
-                unstash 'pyloraserver-wheel'
+                unstash 'pychirp-wheel'
                 sh 'pip3 install -r dev_requirements.txt' 
                 sh 'python3 -m twine upload -u ${PYPI_TEST_USR} -p ${PYPI_TEST_PSW} **/*.whl'
             }
diff --git a/README.rst b/README.rst
index 3b88d0d..299c6a9 100644
--- a/README.rst
+++ b/README.rst
@@ -1,16 +1,16 @@
-.. image:: https://readthedocs.org/projects/pyloraserver/badge/?version=latest
-   :target: https://pyloraserver.readthedocs.io/en/latest/?badge=latest
+.. image:: https://readthedocs.org/projects/pychirp/badge/?version=latest
+   :target: https://pychirp.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status
 
-PyLoRaServer
-============
+PyChirp
+=======
 
-The LoRaServer.io Python Library
+The Chirpstack.io Python Library
 
-This python library makes interaction with the loraserver.io project that bit easier.
+This python library makes interaction with the chirpstack.io project that bit easier.
 
 For full documentation, including examples, please see our pages on `Read The Docs`__
 
 
-.. _RTD: https://pyloraserver.readthedocs.io/en/latest/
+.. _RTD: https://pychirp.readthedocs.io/en/latest/
 __ RTD_
diff --git a/docs/conf.py b/docs/conf.py
index 5719c3e..4fdf79d 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,7 +18,7 @@ sys.path.insert(1, os.path.abspath('..'))
 
 # -- Project information -----------------------------------------------------
 
-project = 'PyLoRaServer'
+project = 'Pychirp'
 copyright = '2019, Mockingbird Consulting Ltd'
 author = 'Mockingbird Consulting Ltd'
 
diff --git a/docs/contents.rst b/docs/contents.rst
index 9ab654a..e547e7d 100644
--- a/docs/contents.rst
+++ b/docs/contents.rst
@@ -1,7 +1,7 @@
-Welcome to PyLoRaServer's documentation!
+Welcome to Pychirp's documentation!
 ========================================
 
-PyLoRaServer is a python library for interacting with the loraserver.io project.
+Pychirp is a python library for interacting with the chirpstack.io project.
 
 Contents
 ========
diff --git a/docs/examples.rst b/docs/examples.rst
index 271f9e3..32a1961 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -6,17 +6,17 @@ List all Devices
 
 You can list all devices with the following code::
 
-    from pyloraserver import loraserver, device
+    from pychirp import chirpstack, device
     
     # Setup the connection
-    cx = loraserver.Loraserver(
-            loraserver_url="https://my.lora.server",
-            loraserver_user="my_api_username",
-            loraserver_pass="my_api_password"
+    cx = chirpstack.Chirpstack(
+            chirpstack_url="https://my.lora.server",
+            chirpstack_user="my_api_username",
+            chirpstack_pass="my_api_password"
             )
     
     # Connect to the device class
-    d = device.Devices(loraserver_connection=cx)
+    d = device.Devices(chirpstack_connection=cx)
     
     # Get all the devices
     devices = d.list_all(appid=7)
@@ -43,7 +43,7 @@ This will return the following output (the device ID's etc will be different for
     lastSeenAt => 2019-04-17T06:12:31.904650Z
     ==========
     devEUI => deadbeefdeadbeef
-    name => pyloraserver_test
+    name => pychirp_test
     applicationID => 7
     description => Testing from the new library
     deviceProfileID => 54767cb5-ba1b-494e-beef-8821ddd69bcb
@@ -62,14 +62,14 @@ Create a device
 
 Creating a device is also straight-forward::
 
-    from pyloraserver import loraserver, device
+    from pychirp import chirpstack, device
     # Setup the connection
-    cx = loraserver.Loraserver(
-            loraserver_url="https://my.lora.server",
-            loraserver_user="my_api_username",
-            loraserver_pass="my_api_password"
+    cx = chirpstack.Chirpstack(
+            chirpstack_url="https://my.lora.server",
+            chirpstack_user="my_api_username",
+            chirpstack_pass="my_api_password"
             )
-    d = device.Devices(loraserver_connection=cx)
+    d = device.Devices(chirpstack_connection=cx)
     d.description = "This is my device"
     d.deveui = "deadbeefdeadbeef"
     d.name = "My-device-name"
diff --git a/docs/index.rst b/docs/index.rst
index 96f0c8e..4e2039e 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1,12 +1,12 @@
-.. PyLoRaServer documentation master file, created by
+.. Pychirp documentation master file, created by
    sphinx-quickstart on Mon Apr 22 07:58:57 2019.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Welcome to PyLoRaServer's documentation!
+Welcome to Pychirp's documentation!
 ========================================
 
-PyLoRaServer is a python library for interacting with the loraserver.io project.
+Pychirp is a python library for interacting with the chirpstack.io project.
 
 
 Indices and tables
diff --git a/pychirp/__init__.py b/pychirp/__init__.py
new file mode 100644
index 0000000..ce9423b
--- /dev/null
+++ b/pychirp/__init__.py
@@ -0,0 +1,1 @@
+__name__ = "pychirp"
diff --git a/pyloraserver/applications.py b/pychirp/applications.py
similarity index 74%
rename from pyloraserver/applications.py
rename to pychirp/applications.py
index e9178e6..286c2d3 100644
--- a/pyloraserver/applications.py
+++ b/pychirp/applications.py
@@ -1,21 +1,21 @@
 class Application:
-    """ A class to represent Applications within LoRaServer.io
+    """ A class to represent Applications within Chirpstack.io
 
     Args:
         name (str): The name of the application.
         description (str): A description of the application.
-        loraserver_connection (loraserver_connection):
-            A loraserver_connection object
+        chirpstack_connection (chirpstack_connection):
+            A chirpstack_connection object
     Returns:
-        Loraserver: A loraserver_connection object
+        Chirpstack: A chirpstack_connection object
     """
 
     def __init__(self,
                  name=None,
                  description=None,
-                 loraserver_connection=None
+                 chirpstack_connection=None
                  ):
-        self.lscx = loraserver_connection
+        self.cscx = chirpstack_connection
 
     def list(self,
              limit=10,
@@ -34,7 +34,7 @@ class Application:
             dict: A dict of the search results
         """
         url = "%s/api/applications?limit=%s&offset=%s" % (
-                self.lscx.loraserver_url,
+                self.cscx.chirpstack_url,
                 limit,
                 offset)
         if search_term is not None:
@@ -42,5 +42,5 @@ class Application:
         if orgid is not None:
             url = "%s&organizationID=%s" % (url, orgid)
 
-        ret_list = self.lscx.connection.get(url)
+        ret_list = self.cscx.connection.get(url)
         return ret_list.json()
diff --git a/pyloraserver/loraserver.py b/pychirp/chirpstack.py
similarity index 52%
rename from pyloraserver/loraserver.py
rename to pychirp/chirpstack.py
index d2dbfde..86bd91c 100644
--- a/pyloraserver/loraserver.py
+++ b/pychirp/chirpstack.py
@@ -1,47 +1,47 @@
 import logging
 import requests
 
-logger = logging.getLogger('pyloraserver.loraserver')
+logger = logging.getLogger('pychirp.chirpstack')
 
 
-class Loraserver:
+class Chirpstack:
     """
-    Connect to the LoRaServer.io API and return an object that
+    Connect to the Chirpstack.io API and return an object that
     can be used for querying the same
 
     Args:
-        loraserver_url (str): The full URL to the LoRaServer
+        chirpstack_url (str): The full URL to the Chirpstack
             *excluding* the `/api` at the end (i.e.
-            https://my.loraserver.com/,
-            not https://my.loraserver.com/api)
-        loraserver_user (str): The user name to allow us to
+            https://my.chirpstack.com/,
+            not https://my.chirpstack.com/api)
+        chirpstack_user (str): The user name to allow us to
             authenticate and retrieve the JSON Web Token
             required to communicate with the API
-        loraserver_pass (str): The user name to allow us to
+        chirpstack_pass (str): The user name to allow us to
             authenticate and retrieve the JSON Web Token
             required to communicate with the API
     Returns:
-        Loraserver: A loraserver object
+        Chirpstack: A chirpstack object
     """
     def __init__(self,
-                 loraserver_url=None,
-                 loraserver_user=None,
-                 loraserver_pass=None
+                 chirpstack_url=None,
+                 chirpstack_user=None,
+                 chirpstack_pass=None
                  ):
-        self.loraserver_url = loraserver_url
-        self.loraserver_user = loraserver_user
-        self.loraserver_pass = loraserver_pass
+        self.chirpstack_url = chirpstack_url
+        self.chirpstack_user = chirpstack_user
+        self.chirpstack_pass = chirpstack_pass
         self.connect()
 
     def _authenticate(self):
         """
-        Authenticate against the LoRaServer.io API
+        Authenticate against the Chirpstack.io API
         and return a JWT for use elsewhere
         """
-        auth_url = "%s/api/internal/login" % self.loraserver_url
+        auth_url = "%s/api/internal/login" % self.chirpstack_url
         payload = {
-                    "username": self.loraserver_user,
-                    "password": self.loraserver_pass
+                    "username": self.chirpstack_user,
+                    "password": self.chirpstack_pass
                     }
         auth_request = requests.post(
                 auth_url,
@@ -54,11 +54,11 @@ class Loraserver:
         return auth_header
 
     def connect(self):
-        """ Connect to the loraserver and setup a new
+        """ Connect to the chirpstack and setup a new
         sesssion
 
         Returns:
-            Loraserver.connection: A requests session object
+            Chirpstack.connection: A requests session object
                 for use against the API
         """
         auth_header = self._authenticate()
diff --git a/pyloraserver/device.py b/pychirp/device.py
similarity index 88%
rename from pyloraserver/device.py
rename to pychirp/device.py
index bc523fb..ecca488 100644
--- a/pyloraserver/device.py
+++ b/pychirp/device.py
@@ -1,4 +1,4 @@
-# Interacting with the LoraServer API to manage devices
+# Interacting with the Chirpstack API to manage devices
 import uuid
 import binascii
 import json
@@ -6,7 +6,7 @@ import json
 
 class Devices:
     """
-    A class to manipulate devices within the LoRaServer.io
+    A class to manipulate devices within the Chirpstack.io
     installation.
 
     Args:
@@ -22,14 +22,14 @@ class Devices:
             or created by the calling software
         appkey (str): The application key for the device. This is
             not required for LoRaWAN 1.0.x devices, and is set to
-            the loraserver.io default of '00000000000000000000000000000000'
+            the chirpstack.io default of '00000000000000000000000000000000'
         nwkkey (str): The Network Key provided either by the
             device manufacturer, the calling software, or (if left blank)
             automatically generated upon device creation
-        loraserver_connection (loraserver_connection):
-            A loraserver_connection object
+        chirpstack_connection (chirpstack_connection):
+            A chirpstack_connection object
     Returns:
-        Device: A loraserver device object
+        Device: A chirpstack device object
     """
     def __init__(self,
                  name=None,
@@ -41,7 +41,7 @@ class Devices:
                  deveui=None,
                  appkey=None,
                  nwkkey=None,
-                 loraserver_connection=None
+                 chirpstack_connection=None
                  ):
         self.name = name
         self.description = description
@@ -52,7 +52,7 @@ class Devices:
         self.deveui = deveui
         self.appKey = '00000000000000000000000000000000'
         self.nwkKey = nwkkey
-        self.lscx = loraserver_connection
+        self.cscx = chirpstack_connection
         self.validate()
 
     def validate(self):
@@ -91,7 +91,7 @@ class Devices:
 
     def create_and_activate(self):
         """
-        Create and activate the device on the LoRaServer.io
+        Create and activate the device on the Chirpstack.io
         installation
 
         Args:
@@ -137,8 +137,8 @@ class Devices:
         device['devEUI'] = self.deveui
         payload = {}
         payload['device'] = device
-        create_device = self.lscx.connection.post(
-            self.lscx.loraserver_url+"/api/devices",
+        create_device = self.cscx.connection.post(
+            self.cscx.chirpstack_url+"/api/devices",
             json=payload
             )
 
@@ -153,8 +153,8 @@ class Devices:
                   }
                 }
 
-            set_keys = self.lscx.connection.post(
-                self.lscx.loraserver_url+"/api/devices/"+self.deveui+"/keys",
+            set_keys = self.cscx.connection.post(
+                self.cscx.chirpstack_url+"/api/devices/"+self.deveui+"/keys",
                 json=keys_payload
                 )
 
@@ -173,8 +173,8 @@ class Devices:
                 return_dict['message'] = "Error: %s" % json.loads(
                         set_keys.content
                         )['message']
-                self.lscx.connection.delete(
-                    self.lscx.loraserver_url+"/api/devices/"+self.deveui,
+                self.cscx.connection.delete(
+                    self.cscx.chirpstack_url+"/api/devices/"+self.deveui,
                 )
         else:
             return_dict['result'] = "failure"
@@ -200,9 +200,9 @@ class Devices:
             dict: A dictionary containing all of the search results
         """
         device_list_query = "%s/api/devices?limit=%s&applicationID=%s" % (
-            self.lscx.loraserver_url,
+            self.cscx.chirpstack_url,
             limit,
             appid
             )
-        devices = self.lscx.connection.get(device_list_query).json()
+        devices = self.cscx.connection.get(device_list_query).json()
         return devices
diff --git a/pyloraserver/deviceProfiles.py b/pychirp/deviceProfiles.py
similarity index 79%
rename from pyloraserver/deviceProfiles.py
rename to pychirp/deviceProfiles.py
index fb639ec..780ab8c 100644
--- a/pyloraserver/deviceProfiles.py
+++ b/pychirp/deviceProfiles.py
@@ -1,12 +1,12 @@
 class DeviceProfiles:
     """
-    A class representing Device Profiles within LoRaServer.io
+    A class representing Device Profiles within Chirpstack.io
 
     Args:
         name (str): The name of the device profile.
         description (str): A description of the device profile.
-        loraserver_connection (loraserver_connection):
-            A loraserver_connection object
+        chirpstack_connection (chirpstack_connection):
+            A chirpstack_connection object
     Returns:
         DeviceProfiles: A device profile object
     """
@@ -14,9 +14,9 @@ class DeviceProfiles:
     def __init__(self,
                  name=None,
                  description=None,
-                 loraserver_connection=None
+                 chirpstack_connection=None
                  ):
-        self.lscx = loraserver_connection
+        self.cscx = chirpstack_connection
 
     def list(self,
              limit=10,
@@ -36,7 +36,7 @@ class DeviceProfiles:
             dict: A dict of the search results
         """
         url = "%s/api/device-profiles?limit=%s&offset=%s" % (
-                self.lscx.loraserver_url,
+                self.cscx.chirpstack_url,
                 limit,
                 offset)
         if appid is not None:
@@ -44,5 +44,5 @@ class DeviceProfiles:
         if orgid is not None:
             url = "%s&organizationID=%s" % (url, orgid)
 
-        ret_list = self.lscx.connection.get(url)
+        ret_list = self.cscx.connection.get(url)
         return ret_list.json()
diff --git a/pyloraserver/__init__.py b/pyloraserver/__init__.py
deleted file mode 100644
index 9dd88ff..0000000
--- a/pyloraserver/__init__.py
+++ /dev/null
@@ -1,1 +0,0 @@
-__name__ = "pyloraserver"
diff --git a/setup.py b/setup.py
index 246be78..1412c15 100644
--- a/setup.py
+++ b/setup.py
@@ -4,14 +4,14 @@ with open("README.rst", "r") as fh:
     long_description = fh.read()
 
 setuptools.setup(
-    name="pyloraserver",
-    version="0.1.6",
+    name="pychirp",
+    version="0.2.0",
     author="Mockingbird Consulting Ltd",
-    author_email="info+pyloraserver@mockingbirdconsulting.co.uk",
-    description="A python library for interacting with Loraserver.io.",
+    author_email="info+pychirp@mockingbirdconsulting.co.uk",
+    description="A python library for interacting with chirpstack.io.",
     long_description=long_description,
     long_description_content_type="text/markdown",
-    url="https://github.com/mockingbirdconsulting/pyloraserver",
+    url="https://github.com/mockingbirdconsulting/pychirp",
     packages=setuptools.find_packages(),
     classifiers=[
         "Programming Language :: Python :: 3",


Test patch:
diff --git a/tests/test_applications.py b/tests/test_applications.py
index f58494f..290db1b 100644
--- a/tests/test_applications.py
+++ b/tests/test_applications.py
@@ -1,5 +1,5 @@
 import pytest
-from pyloraserver import applications
+from pychirp import applications
 
 
 class TestApplication:
@@ -7,7 +7,7 @@ class TestApplication:
     def lora_connection(self, requests_mock):
         # Mock the Authentication Handler
         requests_mock.get(
-                "https://loraserver/api/applications",
+                "https://chirpstack/api/applications",
                 json={
                   "result": [
                         {
@@ -24,22 +24,22 @@ class TestApplication:
                 )
 
         requests_mock.post(
-                "https://loraserver/api/internal/login",
+                "https://chirpstack/api/internal/login",
                 json={
                     "jwt": "eyJhbGciOiZXJ2ZXIiLCJleHAiOjE1NTU1OTk1ODMsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTU1NTUxMzE4Mywic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYXBpYWNjb3VudCJ9.MBkIe1pxh51lB4-qRkjxlMaOa2HBnMhwk148wYrBDj0JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1z"  # noqa: E501
 }
                 )
-        from pyloraserver import loraserver
-        return loraserver.Loraserver(
-                loraserver_url="https://loraserver",
-                loraserver_user="test_user",
-                loraserver_pass="test_pass"
+        from pychirp import chirpstack
+        return chirpstack.Chirpstack(
+                chirpstack_url="https://chirpstack",
+                chirpstack_user="test_user",
+                chirpstack_pass="test_pass"
                 )
 
     def test_device_profile_list(self,
                                  lora_connection
                                  ):
         a = applications.Application(
-                loraserver_connection=lora_connection)
+                chirpstack_connection=lora_connection)
         alist = a.list()
         assert alist['result'][0]['name'] == "TEST_APPLICATION"
diff --git a/tests/test_create_device.py b/tests/test_create_device.py
index c03b0f9..edc14af 100644
--- a/tests/test_create_device.py
+++ b/tests/test_create_device.py
@@ -6,14 +6,14 @@ class TestDeviceCreation:
     def lora_connection(self, requests_mock):
         # Mock the Authentication Handler
         requests_mock.post(
-                "https://loraserver/api/internal/login",
+                "https://chirpstack/api/internal/login",
                 json={
                     "jwt": "eyJhbGciOiZXJ2ZXIiLCJleHAiOjE1NTU1OTk1ODMsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTU1NTUxMzE4Mywic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYXBpYWNjb3VudCJ9.MBkIe1pxh51lB4-qRkjxlMaOa2HBnMhwk148wYrBDj0JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1z"  # noqa: E501
 }
                 )
         # Mock the device list
         requests_mock.get(
-                "https://loraserver/api/devices?limit=100&applicationID=1",
+                "https://chirpstack/api/devices?limit=100&applicationID=1",
                 json={
                       "totalCount": "1",
                       "result": [
@@ -34,34 +34,34 @@ class TestDeviceCreation:
                       ]
                     }
                 )
-        from pyloraserver import loraserver
-        return loraserver.Loraserver(
-                loraserver_url="https://loraserver",
-                loraserver_user="test_user",
-                loraserver_pass="test_pass"
+        from pychirp import chirpstack
+        return chirpstack.Chirpstack(
+                chirpstack_url="https://chirpstack",
+                chirpstack_user="test_user",
+                chirpstack_pass="test_pass"
                 )
 
     @pytest.fixture
     def lora_device(self, lora_connection, requests_mock):
         # Mock the device creation response
         requests_mock.post(
-                "https://loraserver/api/devices",
+                "https://chirpstack/api/devices",
                 json={}
                 )
         requests_mock.post(
-                "https://loraserver/api/devices/deadbeefdeadbeef/keys",
+                "https://chirpstack/api/devices/deadbeefdeadbeef/keys",
                 json={}
                 )
-        from pyloraserver import device
-        return device.Devices(loraserver_connection=lora_connection)
+        from pychirp import device
+        return device.Devices(chirpstack_connection=lora_connection)
 
     def test_device_list_is_a_dict(
             self,
             lora_connection,
             requests_mock
             ):
-        from pyloraserver import device
-        d = device.Devices(loraserver_connection=lora_connection)
+        from pychirp import device
+        d = device.Devices(chirpstack_connection=lora_connection)
         devices = d.list_all(appid=1)
         assert type(devices) is dict
 
diff --git a/tests/test_device_profiles.py b/tests/test_device_profiles.py
index fabedbd..feb07ec 100644
--- a/tests/test_device_profiles.py
+++ b/tests/test_device_profiles.py
@@ -1,5 +1,5 @@
 import pytest
-from pyloraserver import deviceProfiles
+from pychirp import deviceProfiles
 
 
 class TestDeviceProfile:
@@ -7,7 +7,7 @@ class TestDeviceProfile:
     def lora_connection(self, requests_mock):
         # Mock the Authentication Handler
         requests_mock.get(
-                "https://loraserver/api/device-profiles",
+                "https://chirpstack/api/device-profiles",
                 json={
                   "result": [
                     {
@@ -24,22 +24,22 @@ class TestDeviceProfile:
                 )
 
         requests_mock.post(
-                "https://loraserver/api/internal/login",
+                "https://chirpstack/api/internal/login",
                 json={
                     "jwt": "eyJhbGciOiZXJ2ZXIiLCJleHAiOjE1NTU1OTk1ODMsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTU1NTUxMzE4Mywic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYXBpYWNjb3VudCJ9.MBkIe1pxh51lB4-qRkjxlMaOa2HBnMhwk148wYrBDj0JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1z"  # noqa: E501
 }
                 )
-        from pyloraserver import loraserver
-        return loraserver.Loraserver(
-                loraserver_url="https://loraserver",
-                loraserver_user="test_user",
-                loraserver_pass="test_pass"
+        from pychirp import chirpstack
+        return chirpstack.Chirpstack(
+                chirpstack_url="https://chirpstack",
+                chirpstack_user="test_user",
+                chirpstack_pass="test_pass"
                 )
 
     def test_device_profile_list(self,
                                  lora_connection
                                  ):
         dp = deviceProfiles.DeviceProfiles(
-                loraserver_connection=lora_connection)
+                chirpstack_connection=lora_connection)
         dplist = dp.list()
         assert dplist['result'][0]['name'] == "TEST_DEV_PROFILE"
diff --git a/tests/test_device_validation.py b/tests/test_device_validation.py
index 5aef68a..0111237 100644
--- a/tests/test_device_validation.py
+++ b/tests/test_device_validation.py
@@ -1,13 +1,13 @@
 # Validate that a device corrects any data errors
 import pytest
-from pyloraserver import device
+from pychirp import device
 
 
 class TestDevicesValidation(object):
 
     @pytest.fixture
     def lora_correct_device(self):
-        from pyloraserver import device
+        from pychirp import device
         return device.Devices(
                 deveui='deadbeefdeadbeef',
                 nwkkey='deadbeefdeadbeefdeadbeefdeadbeef',
diff --git a/tests/test_loraserver_connection.py b/tests/test_loraserver_connection.py
index d3815af..e9effaa 100644
--- a/tests/test_loraserver_connection.py
+++ b/tests/test_loraserver_connection.py
@@ -1,21 +1,21 @@
 import pytest
-from pyloraserver import device
+from pychirp import device
 
 
-class TestLoRaServerConnection:
+class TestChirpstackConnection:
 
     @pytest.fixture
     def lora_connection(self, requests_mock):
         # Mock the Authentication Handler
         requests_mock.post(
-                "https://loraserver/api/internal/login",
+                "https://chirpstack/api/internal/login",
                 json={
                     "jwt": "eyJhbGciOiZXJ2ZXIiLCJleHAiOjE1NTU1OTk1ODMsImlzcyI6ImxvcmEtYXBwLXNlcnZlciIsIm5iZiI6MTU1NTUxMzE4Mywic3ViIjoidXNlciIsInVzZXJuYW1lIjoiYXBpYWNjb3VudCJ9.MBkIe1pxh51lB4-qRkjxlMaOa2HBnMhwk148wYrBDj0JIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJsb3JhLWFwcC1z"  # noqa: E501
 }
                 )
         # Mock the device list
         requests_mock.get(
-                "https://loraserver/api/devices?limit=10&applicationID=1",
+                "https://chirpstack/api/devices?limit=10&applicationID=1",
                 json={
                       "totalCount": "1",
                       "result": [
@@ -36,18 +36,18 @@ class TestLoRaServerConnection:
                       ]
                     }
                 )
-        from pyloraserver import loraserver
-        return loraserver.Loraserver(
-                loraserver_url="https://loraserver",
-                loraserver_user="test_user",
-                loraserver_pass="test_pass"
+        from pychirp import chirpstack
+        return chirpstack.Chirpstack(
+                chirpstack_url="https://chirpstack",
+                chirpstack_user="test_user",
+                chirpstack_pass="test_pass"
                 )
 
     def test_connection_setup(self, lora_connection):
         lora_connection.connection.get(
-                'https://loraserver/api/devices?limit=10&applicationID=1'
+                'https://chirpstack/api/devices?limit=10&applicationID=1'
                 )
 
     def test_connection_setup_with_device_list(self, lora_connection):
-        devices = device.Devices(loraserver_connection=lora_connection)
+        devices = device.Devices(chirpstack_connection=lora_connection)
         devices.list_all(limit=10, appid=1)