Make test_model into a nose unittest.  Define defensive unit tests.