Pytesting "pymc3 functions"

I am still not sure what your function is returning. I imagined it was something like:

def generate_normal(params):
  return pm.Normal(**params)

with pm.Model() as m:
  x = generate_normal({'mu': 0, 'sigma': 2})

In which case x is not a theano TensorVariable but a pymc3.model.FreeRV no?