

def testPostCommentMissingObjectPK(self):
    a = Article.objects.get(pk=1)
    data = self.getValidData(a)
    del data['object_pk']
    response = self.client.post('/post/', data)
    self.assertEqual(response.status_code, 400)

dataset/ETHPy150Open dcramer/django-compositepks/tests/regressiontests/comment_tests/tests/comment_view_tests.py CommentViewTests.testPostCommentMissingObjectPK/original