def test_retrieve_spls_filter_by_set(self):
    'Test retrieving a spl by set filter'
    set_id = Set.objects.first()
    res = self.client.get(SPL_URL, {'set_id': set_id.id}, format='json')
    serializer = SplSerializer(Spl.objects.filter(set__id=set_id.id), many=True)
    self.assertEqual(res.status_code, status.HTTP_200_OK)
    self.assertEqual(serializer.data, res.data['results'])
Test retrieving a spl by set filter
def test_retrieve_spls_filter_by_set(self):
    
    set_id = Set.objects.first()
    res = self.client.get(SPL_URL, {'set_id': set_id.id}, format='json')
    serializer = SplSerializer(Spl.objects.filter(set__id=set_id.id), many=True)
    self.assertEqual(res.status_code, status.HTTP_200_OK)
    self.assertEqual(serializer.data, res.data['results'])