Skip to content

Commit

Permalink
Remove server forwarding rule reference
Browse files Browse the repository at this point in the history
  • Loading branch information
jm-mailosaur committed Jan 25, 2021
1 parent 8b5e5f5 commit c74500c
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
2 changes: 0 additions & 2 deletions mailosaur/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from .message_summary import MessageSummary
from .message_list_result import MessageListResult
from .search_criteria import SearchCriteria
from .forwarding_rule import ForwardingRule
from .server import Server
from .server_list_result import ServerListResult
from .server_create_options import ServerCreateOptions
Expand All @@ -34,7 +33,6 @@
'MessageSummary',
'MessageListResult',
'SearchCriteria',
'ForwardingRule',
'Server',
'ServerListResult',
'ServerCreateOptions',
Expand Down
22 changes: 0 additions & 22 deletions mailosaur/models/forwarding_rule.py

This file was deleted.

6 changes: 0 additions & 6 deletions mailosaur/models/server.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from .forwarding_rule import ForwardingRule

class Server(object):
"""Server.
Expand All @@ -15,9 +13,6 @@ class Server(object):
:type users: list[str]
:param messages: The number of messages currently in the server.
:type messages: int
:param forwarding_rules: The rules used to manage email forwarding for
this server.
:type forwarding_rules: list[~mailosaur.models.ForwardingRule]
"""

def __init__(self, data=None):
Expand All @@ -29,4 +24,3 @@ def __init__(self, data=None):
self.name = data.get('name', None)
self.users = data.get('users', None)
self.messages = data.get('messages', None)
self.forwarding_rules = [ForwardingRule(i) for i in data.get('forwardingRules', [])]
3 changes: 0 additions & 3 deletions tests/servers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ def test_crud(self):
self.assertIsNotNone(created_server.password)
self.assertIsInstance(created_server.users, list)
self.assertIsInstance(created_server.messages, numbers.Number)
self.assertIsInstance(created_server.forwarding_rules, list)

# Retrieve a server and confirm it has expected content
retrieved_server = self.client.servers.get(created_server.id)
Expand All @@ -43,7 +42,6 @@ def test_crud(self):
self.assertIsNotNone(retrieved_server.password)
self.assertIsInstance(retrieved_server.users, list)
self.assertIsInstance(retrieved_server.messages, numbers.Number)
self.assertIsInstance(retrieved_server.forwarding_rules, list)

# Update a server and confirm it has changed
retrieved_server.name += " updated with ellipsis … and emoji 👨🏿‍🚒"
Expand All @@ -53,7 +51,6 @@ def test_crud(self):
self.assertEqual(retrieved_server.password, updated_server.password)
self.assertEqual(retrieved_server.users, updated_server.users)
self.assertEqual(retrieved_server.messages, updated_server.messages)
self.assertEqual(retrieved_server.forwarding_rules, updated_server.forwarding_rules)

self.client.servers.delete(retrieved_server.id)

Expand Down

0 comments on commit c74500c

Please sign in to comment.