Fix breakage in factories and unit tests

In commit 28d42263f59ff1106e9a894a7176460f0dde770e a model attribute was
renamed. This commit updates factories and unit tests to accomodate that change.