Example #1
0
 def test_repr(self):
     message = SubredditMessage(self.reddit, _data={'id': 'dummy'})
     assert repr(message) == 'SubredditMessage(id=\'dummy\')'
Example #2
0
 def test_str(self):
     message = SubredditMessage(self.reddit, _data={'id': 'dummy'})
     assert str(message) == 'dummy'
Example #3
0
 def test_unmute(self):
     self.reddit.read_only = False
     with self.recorder.use_cassette('TestSubredditMessage.test_unmute'):
         message = SubredditMessage(self.reddit, _data={'id': '5yr8id'})
         message.unmute()
Example #4
0
 def test_inheritance(self):
     message = SubredditMessage(self.reddit, _data={'id': 'dummy'})
     assert isinstance(message, Message)
Example #5
0
 def test_mute(self):
     self.reddit.read_only = False
     with self.recorder.use_cassette("TestSubredditMessage.test_mute"):
         message = SubredditMessage(self.reddit, _data={"id": "5yr8id"})
         message.mute()
Example #6
0
 def test_unmute(self):
     self.reddit.read_only = False
     with self.use_cassette():
         message = SubredditMessage(self.reddit, _data={"id": "5yr8id"})
         message.unmute()
Example #7
0
 def test_mute(self):
     self.reddit.read_only = False
     with self.recorder.use_cassette('TestSubredditMessage.test_mute'):
         message = SubredditMessage(self.reddit, _data={'id': '5yr8id'})
         message.mute()
Example #8
0
 def test_str(self):
     message = SubredditMessage(self.reddit, _data={"id": "dummy"})
     assert str(message) == "dummy"
Example #9
0
 def test_repr(self):
     message = SubredditMessage(self.reddit, _data={"id": "dummy"})
     assert repr(message) == "SubredditMessage(id='dummy')"
Example #10
0
 def test_inheritance(self):
     message = SubredditMessage(self.reddit, _data={"id": "dummy"})
     assert isinstance(message, Message)
Example #11
0
 def test_unmute(self):
     self.reddit.read_only = False
     with self.recorder.use_cassette("TestSubredditMessage.test_unmute"):
         message = SubredditMessage(self.reddit, _data={"id": "5yr8id"})
         message.unmute()