fix bad import and add test

http://manage.dimagi.com/default.asp?134755134755
Merge pull request #4294 from dimagi/case-134755

fix bad import and add test