

def test_get_other_pks(self):
    '\n        Test override get_other_pks\n        and assert return value\n        '

    class MockViewSet(AlchemyModelViewSet):

        def get_other_pks(self, request):
            return {
                'pk1': 'value',
            }
    viewset = MockViewSet()
    pks = viewset.get_other_pks(mock.Mock())
    self.assertIsNotNone(pks)
    self.assertIn('pk1', pks)

    class MockViewSet(AlchemyModelViewSet):
        pass
    viewset = MockViewSet()
    pks = viewset.get_other_pks(mock.Mock())
    self.assertIsNotNone(pks)
    self.assertIsInstance(pks, dict)

dataset/ETHPy150Open dealertrack/djangorest-alchemy/djangorest_alchemy/tests/test_viewsets.py TestAlchemyViewSetUnit.test_get_other_pks/original