コード例 #1
0
    def test_update_status(self, mock_oauthhandler):

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

            update_status("Status")

            mock_api.assert_called_once_with(status="Status")
コード例 #2
0
    def test_update_status(self, mock_oauthhandler):

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

            update_status("Status")

            mock_api.assert_called_once_with(status="Status")
コード例 #3
0
    def test_update_status(self, mock_oauthhandler):

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

            update_status("Status")
            assert not mock_api.called
コード例 #4
0
    def test_update_status(self, mock_oauthhandler):

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

            update_status("Status")
            assert not mock_api.called