Created
August 22, 2011 21:10
-
-
Save fsouza/1163590 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_excluir_empresario_tambem_deve_excluir_empresa(self): | |
"""Excluir um empresário também deve excluir todas as suas empresas""" | |
empresario = Empresario.objects.get(pk=1) | |
id_empresa = empresario.empresa.id | |
empresario.delete() | |
# Verifica se a empresa foi deletada | |
self.assertRaises(Empresa.DoesNotExist, Empresa.objects.get, pk=id_empresa) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment