Skip to content

Commit

Permalink
Rename Test to MSS.
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin 't Hart committed Jun 19, 2024
1 parent 3e5f4e8 commit de7ef8a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion LONG_DESCRIPTION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Quick Start Example
import swish
swish_client = swish.SwishClient(
environment=swish.Environment.Test,
environment=swish.Environment.MSS,
merchant_swish_number='1231181189',
cert=('/path/to/cert.pem', '/path/to/key.pem'),
verify='/path/to/swish.pem'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ def setUp(self):
cert = (cert_file_path, key_file_path)
verify = os.path.join(current_folder, "swish.pem")
self.client = swish.SwishClient(
environment=swish.Environment.Test,
environment=swish.Environment.MSS,
merchant_swish_number='1231181189',
cert=cert,
verify=verify
)

def test_client(self):
self.assertEqual(self.client.environment.base_url, swish.Environment.Test.base_url)
self.assertEqual(self.client.environment.base_url, swish.Environment.MSS.base_url)
self.assertEqual(self.client.merchant_swish_number, '1231181189')

def test_create_payment_ecommerce(self):
Expand Down
10 changes: 5 additions & 5 deletions tests/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
class EnvironmentTestCase(unittest.TestCase):

def test_parse_environment_string(self):
environment = Environment.parse_environment("test")
self.assertEqual(environment, Environment.Test)
environment = Environment.parse_environment("mss")
self.assertEqual(environment, Environment.MSS)

def test_parse_environment_string_error(self):
with self.assertRaises(ConfigurationError):
Environment.parse_environment("invalid")

def test_parse_environment_object(self):
environment = Environment.parse_environment(Environment.Test)
self.assertEqual(environment, Environment.Test)
environment = Environment.parse_environment(Environment.MSS)
self.assertEqual(environment, Environment.MSS)

def test_environment_str(self):
environment = Environment.Test
environment = Environment.MSS
self.assertEqual(str(environment), environment.name)

0 comments on commit de7ef8a

Please sign in to comment.