From fb0d65cebd8ba9417b567f3a02c727dd384cb121 Mon Sep 17 00:00:00 2001 From: kovacsbalu Date: Thu, 15 Jan 2015 09:15:44 +0000 Subject: [PATCH] added __repr__ test --- tests/test_channels.py | 5 +++++ tests/test_devices.py | 3 +++ 2 files changed, 8 insertions(+) diff --git a/tests/test_channels.py b/tests/test_channels.py index 96006e7..b5ac0c3 100644 --- a/tests/test_channels.py +++ b/tests/test_channels.py @@ -20,6 +20,9 @@ def test_encoding_support(self): # cause any errors. print(self.channel) + def test_repr(self): + assert repr(self.channel) == "Channel(name: 'test channel' tag: '%s')" % self.channel_tag + def test_push_note(self): title = "test title" body = "test body" @@ -62,3 +65,5 @@ def test_push(self): self.channel._push(data) pushed_data = {"title": "test title", "channel_tag": self.channel_tag} self.account._push.assert_called_with(pushed_data) + + diff --git a/tests/test_devices.py b/tests/test_devices.py index eb32771..993825b 100644 --- a/tests/test_devices.py +++ b/tests/test_devices.py @@ -20,6 +20,9 @@ def test_encoding_support(self): # cause any errors. print(self.device) + def test_repr(self): + assert repr(self.device) == "Device('test dev')" + def test_push_note(self): title = "test title" body = "test body"