Moved monketnotfound to monkey.py

CR comment
This commit is contained in:
Shay Nehmad 2019-05-27 16:47:30 +03:00
parent bb40560fc7
commit 2ecc683216
3 changed files with 5 additions and 4 deletions

View File

@ -1,2 +0,0 @@
class MonkeyNotFoundError(Exception):
pass

View File

@ -5,7 +5,6 @@ import mongoengine
from mongoengine import Document, StringField, ListField, BooleanField, EmbeddedDocumentField, DateField, \
ReferenceField
from monkey_island.cc.models.errors import MonkeyNotFoundError
from monkey_island.cc.models.monkey_ttl import MonkeyTtl
@ -55,3 +54,7 @@ class Monkey(Document):
# Trying to dereference unknown document - the monkey is MIA.
monkey_is_dead = True
return monkey_is_dead
class MonkeyNotFoundError(Exception):
pass

View File

@ -7,7 +7,7 @@ from unittest import TestCase
import mongomock
from monkey import Monkey
from monkey_island.cc.models.errors import MonkeyNotFoundError
from monkey_island.cc.models.monkey import MonkeyNotFoundError
from monkey_ttl import MonkeyTtl