def test_no_value(self): """Ensure 'content-type' is set if no existing value is provided.""" mock_kwargs = {'headers': {}} client._set_content_type(mock_kwargs) self.assertEqual( mock_kwargs, {'headers': {'content-type': 'application/json'}}, )
def test_existing_value(self): """Ensure 'content-type' is not set if a value is provided.""" mock_kwargs = {'headers': {'content-type': ''}} client._set_content_type(mock_kwargs) self.assertEqual(mock_kwargs, {'headers': {'content-type': ''}})