Last active
January 11, 2017 17:47
-
-
Save morenoh149/5c232a4b72f4a63f7d2957c22f97c1e3 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 monitor_model(): | |
try: | |
user = User().save() | |
account = Account(user=user).save() | |
except: | |
result = 'failed' | |
else: | |
result = 'passed' | |
finally: | |
if user: | |
user.delete() | |
if account: | |
account.delete() | |
return django.http.Response(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment