def METHOD_NAME(self, tag, value, data_type, global_step, kwargs, expected_error, expected_msg):
    with pytest.raises(expected_error, match=expected_msg):
        dxo = mock_add(tag=tag, value=value, data_type=data_type, global_step=global_step, **kwargs)