Fix bug in module `robottelo.factories`

Add tests to ensure the bug is fixed.