Skip to content

Commit

Permalink
Changes made in response to documentation and CI failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Firdaussi committed Jan 30, 2025
1 parent 2d5f6a1 commit c2fe15c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
ROSETTA_CLIENT_BASE_URL=
ROSETTA_CLIENT_KEY=
DELIVERY_OPTIONS_CLIENT_BASE_URL=
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ See [Sentry's official guide](https://docs.sentry.io/platforms/python/guides/dja

`.env` variables:

| Variable | Purpose |
| ------------------------- | -------------------------- |
| `ROSETTA_CLIENT_BASE_URL` | Api used to query the data |
| `ROSETTA_CLIENT_KEY` | Api key to query the data |
| Variable | Purpose | Default in base.py |
| ---------------------------------- | -------------------------- | ------------------ |
| `ROSETTA_CLIENT_BASE_URL` | Api used to query the data | No |
| `ROSETTA_CLIENT_KEY` | Api key to query the data | No |
| `DELIVERY_OPTIONS_CLIENT_BASE_URL` | Api for Delivery options | Yes |
21 changes: 0 additions & 21 deletions test/deliveryoptions/test_reader_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
from app.deliveryoptions.utils import (
Reader,
get_dev_reader_type,
is_dev,
is_onsite,
is_staff,
)
Expand Down Expand Up @@ -98,26 +97,6 @@ def test_is_not_onsite_or_staff_with_mocked_ipv6(self, mock_get_client_ip):
self.assertFalse(is_staff(ip_address))


class TestIsDev(unittest.TestCase):
def test_local_ip_v4(self):
# Test with IPv4 loopback address
ip_address = "127.0.0.1"
result = is_dev(ip_address)
self.assertTrue(result) # Should return True for local machine

def test_local_ip_v6(self):
# Test with IPv6 loopback address
ip_address = "::1"
result = is_dev(ip_address)
self.assertTrue(result) # Should return True for local machine

def test_non_local_ip(self):
# Test with a non-local IP address
ip_address = "192.168.1.1"
result = is_dev(ip_address)
self.assertFalse(result) # Should return False for non-local machine


class TestGetDevReaderType(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand Down

0 comments on commit c2fe15c

Please sign in to comment.