From 2ecc683216bdd0cbfd191a67213f742c8b27a7c3 Mon Sep 17 00:00:00 2001 From: Shay Nehmad Date: Mon, 27 May 2019 16:47:30 +0300 Subject: [PATCH] Moved monketnotfound to monkey.py CR comment --- monkey/monkey_island/cc/models/errors.py | 2 -- monkey/monkey_island/cc/models/monkey.py | 5 ++++- monkey/monkey_island/cc/models/test_monkey.py | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 monkey/monkey_island/cc/models/errors.py diff --git a/monkey/monkey_island/cc/models/errors.py b/monkey/monkey_island/cc/models/errors.py deleted file mode 100644 index 69cb529dd..000000000 --- a/monkey/monkey_island/cc/models/errors.py +++ /dev/null @@ -1,2 +0,0 @@ -class MonkeyNotFoundError(Exception): - pass diff --git a/monkey/monkey_island/cc/models/monkey.py b/monkey/monkey_island/cc/models/monkey.py index 68bdf6154..bb018caa9 100644 --- a/monkey/monkey_island/cc/models/monkey.py +++ b/monkey/monkey_island/cc/models/monkey.py @@ -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 diff --git a/monkey/monkey_island/cc/models/test_monkey.py b/monkey/monkey_island/cc/models/test_monkey.py index 23f26addb..ad5fc17de 100644 --- a/monkey/monkey_island/cc/models/test_monkey.py +++ b/monkey/monkey_island/cc/models/test_monkey.py @@ -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