

def test_decl_retrieve(self):
    resp = self.client.get('/api/declmodels/1/')
    self.assertEqual(resp.status_code, status.HTTP_200_OK)
    self.assertIsInstance(resp.data, dict)
    self.assertEqual(resp.data['declarativemodel_id'], 1)
    self.assertEqual(resp.data['field'], 'test')
    self.assertIsInstance(resp.data['datetime'], six.string_types)
    self.assertIsInstance(resp.data['floatfield'], float)
    self.assertIsInstance(resp.data['bigintfield'], six.integer_types)

dataset/ETHPy150Open dealertrack/djangorest-alchemy/djangorest_alchemy/tests/test_viewsets.py TestAlchemyViewSetIntegration.test_decl_retrieve/original