def test_get_other_pks(self):
        # Test overriding
        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)

        # Tese default implementation
        class MockViewSet(AlchemyModelViewSet):
            pass

        viewset = MockViewSet()
        pks = viewset.get_other_pks(mock.Mock())
        self.assertIsNotNone(pks)
        self.assertIsInstance(pks, dict)
Test override get_other_pks
dataset/ETHPy150Open dealertrack/djangorest-alchemy/djangorest_alchemy/tests/test_viewsets.py/TestAlchemyViewSetUnit.test_get_other_pks