def test_send_dm(self, mock_oauthhandler):

        with patch.object(API, 'send_direct_message') as mock_api:

            send_dm("d0ugal", "Hi!")

            mock_api.assert_called_once_with(screen_name="d0ugal", text="Hi!")
Exemple #2
0
    def test_send_dm(self, mock_oauthhandler):

        with patch.object(API, 'send_direct_message') as mock_api:

            send_dm("d0ugal", "Hi!")

            mock_api.assert_called_once_with(screen_name="d0ugal", text="Hi!")
    def test_send_dm(self, mock_oauthhandler):

        with patch.object(API, 'send_direct_message') as mock_api:

            send_dm("d0ugal", "Hi!")
            assert not mock_api.called
Exemple #4
0
    def test_send_dm(self, mock_oauthhandler):

        with patch.object(API, 'send_direct_message') as mock_api:

            send_dm("d0ugal", "Hi!")
            assert not mock_api.called