Repository: fossasia/open-event-server

Issue:
Evaluate, propose and implement set up of robot framework with Selenium
[Robot Framework](http://robotframework.org/) is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD). It has easy-to-use tabular test data syntax and it utilizes the keyword-driven testing approach.

As we have a lot of test cases it seems suitable to automate them with the Robot Framework and possibly with [Selenium](http://www.seleniumhq.org/).

Please propose an and implement a way, best as integrated tests and document how test cases could be added.



Discussion:
Selenium is nice  but we need to improve it -a problem occurs when selenium tries to open browser in vagrant - it can't open. So we should use selenium in a headless state(read an article) [link](http://www.installationpage.com/selenium/how-to-run-selenium-headless-firefox-in-ubuntu/) 

@rafalkowalski What about setup on a Vanilla system (https://github.com/fossasia/open-event-orga-server/issues/1548)? Vagrant is not the only way it should be possible to install the application. If it is installed in other ways are these issues persistent? Does it work in the headless state then as well? I do not have experience with this. Who has got input?

@mariobehling I've mentioned Vagrant as an example. i think that if we run it on Vagrant it should work on the other system as well


Resolving patch:
diff --git a/manage.py b/manage.py
--- a/manage.py
+++ b/manage.py
@@ -3,7 +3,9 @@
 from app.models.event import Event, get_new_event_identifier
 from app import manager
 from app import current_app as app
-
+from app.models import db
+from app.helpers.data import DataManager
+from populate_db import populate
 
 @manager.command
 def list_routes():
@@ -26,5 +28,13 @@ def add_event_identifier():
         event.identifier = get_new_event_identifier()
         save_to_db(event)
 
+@manager.option('-c', '--credentials', help='Super admin credentials. Eg. username:password')
+def initialize_db(credentials):
+    with app.app_context():
+        db.create_all()
+        credentials = credentials.split(":")
+        DataManager.create_super_admin(credentials[0], credentials[1])
+        populate()
+
 if __name__ == "__main__":
     manager.run()


Test patch:
diff --git a/requirements/tests.txt b/requirements/tests.txt
--- a/requirements/tests.txt
+++ b/requirements/tests.txt
@@ -4,3 +4,8 @@ coverage==4.0.3
 coveralls==1.1.0
 codeclimate-test-reporter==0.1.1
 beautifulsoup4
+robotframework==3.0
+robotframework-faker==3.0.0
+robotframework-selenium2library==1.7.4
+robotframework-requests==0.4.5
+robotframework-databaselibrary==0.8.1
diff --git a/tests/__init__.py b/tests/__init__.py
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -1 +0,0 @@
-from tests.utils import OpenEventTestCase
diff --git a/tests/robot/login.robot b/tests/robot/login.robot
new file mode 100644
--- /dev/null
+++ b/tests/robot/login.robot
@@ -0,0 +1,47 @@
+*** Settings ***
+Documentation     A test suite with a single test for valid login.
+...
+...               This test has a workflow that is created using keywords in
+...               the imported resource file.
+Resource          resource.robot
+
+*** Variables ***
+${LOGIN URL}      http://${SERVER}/login
+${WELCOME URL}     http://${SERVER}/
+*** Keywords ***
+Open Browser To Login Page
+    Open Browser    ${LOGIN URL}    ${BROWSER}
+    Maximize Browser Window
+    Set Selenium Speed    ${DELAY}
+    Login Page Should Be Open
+
+Login Page Should Be Open
+    Title Should Be    Login - Open Event
+
+Go To Login Page
+    Go To    ${LOGIN URL}
+    Login Page Should Be Open
+
+Input Username
+    [Arguments]    ${username}
+    Input Text    email    ${username}
+
+Input Password
+    [Arguments]    ${password}
+    Input Text    password    ${password}
+
+Submit Credentials
+    Click Button    Log in
+
+Welcome Page Should Be Open
+    Location Should Be    ${WELCOME URL}
+    Title Should Be    Home - Open Event
+
+*** Test Cases ***
+Valid Login
+    Open Browser To Login Page
+    Input Username    ${SUPERUSER_USERNAME}
+    Input Password    ${SUPERUSER_PASSWORD}
+    Submit Credentials
+    Welcome Page Should Be Open
+    [Teardown]    Close Browser
diff --git a/tests/robot/resource.robot b/tests/robot/resource.robot
new file mode 100644
--- /dev/null
+++ b/tests/robot/resource.robot
@@ -0,0 +1,14 @@
+*** Settings ***
+Documentation     A resource file with reusable keywords and variables.
+...
+...               The system specific keywords created here form our own
+...               domain specific language. They utilize keywords provided
+...               by the imported Selenium2Library.
+Library           Selenium2Library
+
+*** Variables ***
+${SERVER}         localhost:5000
+${BROWSER}        Firefox
+${DELAY}          0
+${SUPERUSER_USERNAME}   open_event_test_user@fossasia.org
+${SUPERUSER_PASSWORD}   fossasia
diff --git a/tests/unittests/__init__.py b/tests/unittests/__init__.py
new file mode 100644
--- /dev/null
+++ b/tests/unittests/__init__.py
@@ -0,0 +1 @@
+from tests.unittests.utils import OpenEventTestCase
diff --git a/tests/api/__init__.py b/tests/unittests/api/__init__.py
similarity index 77%
rename from tests/api/__init__.py
rename to tests/unittests/api/__init__.py
--- a/tests/api/__init__.py
+++ b/tests/unittests/api/__init__.py
@@ -1,6 +1,6 @@
 import unittest
 
-from tests.setup_database import Setup
+from tests.unittests.setup_database import Setup
 
 class OpenEventTestCase(unittest.TestCase):
     def setUp(self):
diff --git a/tests/api/test_custom_fields.py b/tests/unittests/api/test_custom_fields.py
similarity index 98%
rename from tests/api/test_custom_fields.py
rename to tests/unittests/api/test_custom_fields.py
--- a/tests/api/test_custom_fields.py
+++ b/tests/unittests/api/test_custom_fields.py
@@ -1,7 +1,7 @@
 import unittest
 from app.api.helpers.custom_fields import Color, Email, Uri,\
     ImageUri, DateTime, Integer, Float, ChoiceString, Upload
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
 
 
diff --git a/tests/api/test_custom_forms.py b/tests/unittests/api/test_custom_forms.py
similarity index 89%
rename from tests/api/test_custom_forms.py
rename to tests/unittests/api/test_custom_forms.py
--- a/tests/api/test_custom_forms.py
+++ b/tests/unittests/api/test_custom_forms.py
@@ -5,10 +5,10 @@
 from app.models.custom_forms import CustomForms, SESSION_FORM, \
     SPEAKER_FORM
 
-from tests.auth_helper import register
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import get_path, create_event
+from tests.unittests.auth_helper import register
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import get_path, create_event
 from utils_post_data import *
 
 from app import current_app as app
diff --git a/tests/api/test_delete_apis.py b/tests/unittests/api/test_delete_apis.py
similarity index 93%
rename from tests/api/test_delete_apis.py
rename to tests/unittests/api/test_delete_apis.py
--- a/tests/api/test_delete_apis.py
+++ b/tests/unittests/api/test_delete_apis.py
@@ -2,11 +2,11 @@
 import json
 
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import create_event, get_path, Event, Session
-from tests.api.utils_post_data import *
-from tests.auth_helper import register, login
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import create_event, get_path, Event, Session
+from tests.unittests.api.utils_post_data import *
+from tests.unittests.auth_helper import register, login
 from app import current_app as app
 
 
diff --git a/tests/api/test_export_import.py b/tests/unittests/api/test_export_import.py
similarity index 97%
rename from tests/api/test_export_import.py
rename to tests/unittests/api/test_export_import.py
--- a/tests/api/test_export_import.py
+++ b/tests/unittests/api/test_export_import.py
@@ -9,11 +9,11 @@
 import os
 from StringIO import StringIO
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import create_event, get_path, create_services,\
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import create_event, get_path, create_services,\
     create_session, save_to_db, Speaker
-from tests.auth_helper import register
+from tests.unittests.auth_helper import register
 from app import current_app as app
 
 
diff --git a/tests/api/test_get_api_200.py b/tests/unittests/api/test_get_api_200.py
similarity index 89%
rename from tests/api/test_get_api_200.py
rename to tests/unittests/api/test_get_api_200.py
--- a/tests/api/test_get_api_200.py
+++ b/tests/unittests/api/test_get_api_200.py
@@ -1,9 +1,9 @@
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, logout
-from tests.api.utils import get_path, create_event, create_services
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, logout
+from tests.unittests.api.utils import get_path, create_event, create_services
 
 from app import current_app as app
 
diff --git a/tests/api/test_get_api_400.py b/tests/unittests/api/test_get_api_400.py
similarity index 89%
rename from tests/api/test_get_api_400.py
rename to tests/unittests/api/test_get_api_400.py
--- a/tests/api/test_get_api_400.py
+++ b/tests/unittests/api/test_get_api_400.py
@@ -1,9 +1,9 @@
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, login
-from tests.api.utils import get_path, create_event, create_services
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, login
+from tests.unittests.api.utils import get_path, create_event, create_services
 
 from app import current_app as app
 
diff --git a/tests/api/test_get_api_404.py b/tests/unittests/api/test_get_api_404.py
similarity index 90%
rename from tests/api/test_get_api_404.py
rename to tests/unittests/api/test_get_api_404.py
--- a/tests/api/test_get_api_404.py
+++ b/tests/unittests/api/test_get_api_404.py
@@ -1,9 +1,9 @@
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, login
-from tests.api.utils import get_path, create_event
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, login
+from tests.unittests.api.utils import get_path, create_event
 
 from app import current_app as app
 
diff --git a/tests/api/test_get_api_etags.py b/tests/unittests/api/test_get_api_etags.py
similarity index 91%
rename from tests/api/test_get_api_etags.py
rename to tests/unittests/api/test_get_api_etags.py
--- a/tests/api/test_get_api_etags.py
+++ b/tests/unittests/api/test_get_api_etags.py
@@ -1,9 +1,9 @@
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, login
-from tests.api.utils import get_path, create_event, create_services
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, login
+from tests.unittests.api.utils import get_path, create_event, create_services
 
 from app import current_app as app
 
diff --git a/tests/api/test_get_api_listed_200.py b/tests/unittests/api/test_get_api_listed_200.py
similarity index 92%
rename from tests/api/test_get_api_listed_200.py
rename to tests/unittests/api/test_get_api_listed_200.py
--- a/tests/api/test_get_api_listed_200.py
+++ b/tests/unittests/api/test_get_api_listed_200.py
@@ -1,9 +1,9 @@
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, login
-from tests.api.utils import get_path, create_event, create_services
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, login
+from tests.unittests.api.utils import get_path, create_event, create_services
 
 from app import current_app as app
 from app.helpers.data import update_role_to_admin
diff --git a/tests/api/test_get_api_paginated.py b/tests/unittests/api/test_get_api_paginated.py
similarity index 95%
rename from tests/api/test_get_api_paginated.py
rename to tests/unittests/api/test_get_api_paginated.py
--- a/tests/api/test_get_api_paginated.py
+++ b/tests/unittests/api/test_get_api_paginated.py
@@ -1,10 +1,10 @@
 import unittest
 import json
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, login
-from tests.api.utils import create_event, create_services, get_path
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, login
+from tests.unittests.api.utils import create_event, create_services, get_path
 
 from app import current_app as app
 from app.helpers.data import update_role_to_admin
diff --git a/tests/api/test_get_list_queries.py b/tests/unittests/api/test_get_list_queries.py
similarity index 96%
rename from tests/api/test_get_list_queries.py
rename to tests/unittests/api/test_get_list_queries.py
--- a/tests/api/test_get_list_queries.py
+++ b/tests/unittests/api/test_get_list_queries.py
@@ -2,10 +2,10 @@
 import json
 
 from app.helpers.data import update_role_to_admin
-from tests.auth_helper import register, login
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import get_path, create_event
+from tests.unittests.auth_helper import register, login
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import get_path, create_event
 from utils_post_data import *
 
 from app import current_app as app
diff --git a/tests/api/test_import_more.py b/tests/unittests/api/test_import_more.py
similarity index 96%
rename from tests/api/test_import_more.py
rename to tests/unittests/api/test_import_more.py
--- a/tests/api/test_import_more.py
+++ b/tests/unittests/api/test_import_more.py
@@ -4,9 +4,9 @@
 import time
 import os
 
-from tests.setup_database import Setup
-from tests.api.utils import create_event, get_path, create_services
-from tests.auth_helper import register
+from tests.unittests.setup_database import Setup
+from tests.unittests.api.utils import create_event, get_path, create_services
+from tests.unittests.auth_helper import register
 from app import current_app as app
 from test_export_import import ImportExportBase
 
diff --git a/tests/api/test_post_api.py b/tests/unittests/api/test_post_api.py
similarity index 95%
rename from tests/api/test_post_api.py
rename to tests/unittests/api/test_post_api.py
--- a/tests/api/test_post_api.py
+++ b/tests/unittests/api/test_post_api.py
@@ -1,11 +1,11 @@
 import unittest
 import json
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import create_event, get_path
-from tests.api.utils_post_data import *
-from tests.auth_helper import register, login, logout
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import create_event, get_path
+from tests.unittests.api.utils_post_data import *
+from tests.unittests.auth_helper import register, login, logout
 from app import current_app as app
 
 from app.api.events import EVENT_POST, SOCIAL_LINK_POST
diff --git a/tests/api/test_post_api_auth.py b/tests/unittests/api/test_post_api_auth.py
similarity index 92%
rename from tests/api/test_post_api_auth.py
rename to tests/unittests/api/test_post_api_auth.py
--- a/tests/api/test_post_api_auth.py
+++ b/tests/unittests/api/test_post_api_auth.py
@@ -2,11 +2,11 @@
 import json
 import base64
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import create_event, get_path
-from tests.api.utils_post_data import *
-from tests.auth_helper import register, logout
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import create_event, get_path
+from tests.unittests.api.utils_post_data import *
+from tests.unittests.auth_helper import register, logout
 from app import current_app as app
 
 
diff --git a/tests/api/test_post_api_permissions.py b/tests/unittests/api/test_post_api_permissions.py
similarity index 84%
rename from tests/api/test_post_api_permissions.py
rename to tests/unittests/api/test_post_api_permissions.py
--- a/tests/api/test_post_api_permissions.py
+++ b/tests/unittests/api/test_post_api_permissions.py
@@ -1,12 +1,11 @@
 import unittest
 import json
 
-from tests.setup_database import Setup
-from tests.api.utils import create_event, get_path
-from tests.api.utils_post_data import *
-from tests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.api.utils import create_event, get_path
+from tests.unittests.utils import OpenEventTestCase
 from test_post_api_auth import PostApiAuthTestCase
-from tests.auth_helper import register
+from tests.unittests.auth_helper import register
 from app import current_app as app
 
 
diff --git a/tests/api/test_post_api_validation.py b/tests/unittests/api/test_post_api_validation.py
similarity index 94%
rename from tests/api/test_post_api_validation.py
rename to tests/unittests/api/test_post_api_validation.py
--- a/tests/api/test_post_api_validation.py
+++ b/tests/unittests/api/test_post_api_validation.py
@@ -1,7 +1,7 @@
 import unittest
 
-from tests.api.utils import get_path
-from tests.api.utils_post_data import *
+from tests.unittests.api.utils import get_path
+from tests.unittests.api.utils_post_data import *
 
 from test_post_api import TestPostApiBase
 
diff --git a/tests/api/test_put_api.py b/tests/unittests/api/test_put_api.py
similarity index 94%
rename from tests/api/test_put_api.py
rename to tests/unittests/api/test_put_api.py
--- a/tests/api/test_put_api.py
+++ b/tests/unittests/api/test_put_api.py
@@ -1,11 +1,11 @@
 import unittest
 import json
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.api.utils import create_event, get_path, create_services
-from tests.api.utils_post_data import *
-from tests.auth_helper import register, login, logout
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.api.utils import create_event, get_path, create_services
+from tests.unittests.api.utils_post_data import *
+from tests.unittests.auth_helper import register, login, logout
 from app import current_app as app
 
 
diff --git a/tests/api/test_put_api_validation.py b/tests/unittests/api/test_put_api_validation.py
similarity index 95%
rename from tests/api/test_put_api_validation.py
rename to tests/unittests/api/test_put_api_validation.py
--- a/tests/api/test_put_api_validation.py
+++ b/tests/unittests/api/test_put_api_validation.py
@@ -1,6 +1,6 @@
 import unittest
 
-from tests.api.utils import get_path
+from tests.unittests.api.utils import get_path
 from test_put_api import TestPutApiBase
 from test_post_api_validation import ApiValidationTestCase
 
diff --git a/tests/api/test_swagger.py b/tests/unittests/api/test_swagger.py
similarity index 93%
rename from tests/api/test_swagger.py
rename to tests/unittests/api/test_swagger.py
--- a/tests/api/test_swagger.py
+++ b/tests/unittests/api/test_swagger.py
@@ -1,7 +1,7 @@
 import unittest
 import json
 
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 
 
 class TestSwagger(OpenEventTestCase):
diff --git a/tests/api/test_trashed_items.py b/tests/unittests/api/test_trashed_items.py
similarity index 88%
rename from tests/api/test_trashed_items.py
rename to tests/unittests/api/test_trashed_items.py
--- a/tests/api/test_trashed_items.py
+++ b/tests/unittests/api/test_trashed_items.py
@@ -1,11 +1,11 @@
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
 from app.helpers.data import save_to_db
 from app.models.user import User
-from tests.auth_helper import register
-from tests.api.utils import get_path, create_event, create_services, \
+from tests.unittests.auth_helper import register
+from tests.unittests.api.utils import get_path, create_event, create_services, \
     Event, Session
 from app import current_app as app
 from app.helpers.data import update_role_to_admin
diff --git a/tests/api/test_user_api.py b/tests/unittests/api/test_user_api.py
similarity index 95%
rename from tests/api/test_user_api.py
rename to tests/unittests/api/test_user_api.py
--- a/tests/api/test_user_api.py
+++ b/tests/unittests/api/test_user_api.py
@@ -5,9 +5,9 @@
 from app.models.user import User
 from app.helpers.data import update_role_to_admin
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
-from tests.auth_helper import register, login, logout
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.auth_helper import register, login, logout
 from utils_post_data import POST_USER_DATA, PUT_USER_DATA
 
 
diff --git a/tests/api/utils.py b/tests/unittests/api/utils.py
similarity index 100%
rename from tests/api/utils.py
rename to tests/unittests/api/utils.py
diff --git a/tests/api/utils_post_data.py b/tests/unittests/api/utils_post_data.py
similarity index 100%
rename from tests/api/utils_post_data.py
rename to tests/unittests/api/utils_post_data.py
diff --git a/tests/auth_helper.py b/tests/unittests/auth_helper.py
similarity index 100%
rename from tests/auth_helper.py
rename to tests/unittests/auth_helper.py
diff --git a/tests/functionality/__init__.py b/tests/unittests/functionality/__init__.py
similarity index 100%
rename from tests/functionality/__init__.py
rename to tests/unittests/functionality/__init__.py
diff --git a/tests/functionality/test_admin_trash.py b/tests/unittests/functionality/test_admin_trash.py
similarity index 91%
rename from tests/functionality/test_admin_trash.py
rename to tests/unittests/functionality/test_admin_trash.py
--- a/tests/functionality/test_admin_trash.py
+++ b/tests/unittests/functionality/test_admin_trash.py
@@ -1,12 +1,10 @@
 import unittest
 from datetime import datetime
-from tests.auth_helper import register, login
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
-from tests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
-from app.helpers.data_getter import DataGetter
 from flask import url_for
 from app.models.event import Event
 from app.helpers.data import DataManager, trash_user, trash_session
diff --git a/tests/functionality/test_api.py b/tests/unittests/functionality/test_api.py
similarity index 86%
rename from tests/functionality/test_api.py
rename to tests/unittests/functionality/test_api.py
--- a/tests/functionality/test_api.py
+++ b/tests/unittests/functionality/test_api.py
@@ -1,11 +1,11 @@
 """Copyright 2015 Rafal Kowalski"""
 import unittest
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 
 
 from app import current_app as app
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 
 
 class TestApi(OpenEventTestCase):
diff --git a/tests/functionality/test_data_getter.py b/tests/unittests/functionality/test_data_getter.py
similarity index 95%
rename from tests/functionality/test_data_getter.py
rename to tests/unittests/functionality/test_data_getter.py
--- a/tests/functionality/test_data_getter.py
+++ b/tests/unittests/functionality/test_data_getter.py
@@ -1,11 +1,11 @@
 """Copyright 2016 Rafal Kowalski"""
 import unittest
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 
 
 from app import current_app as app
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app.helpers.data_getter import DataGetter
 
 
diff --git a/tests/functionality/test_event_functions.py b/tests/unittests/functionality/test_event_functions.py
similarity index 74%
rename from tests/functionality/test_event_functions.py
rename to tests/unittests/functionality/test_event_functions.py
--- a/tests/functionality/test_event_functions.py
+++ b/tests/unittests/functionality/test_event_functions.py
@@ -1,9 +1,8 @@
 import unittest
 
-from tests.auth_helper import login
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
-from tests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 
diff --git a/tests/functionality/test_fb_oauth.py b/tests/unittests/functionality/test_fb_oauth.py
similarity index 90%
rename from tests/functionality/test_fb_oauth.py
rename to tests/unittests/functionality/test_fb_oauth.py
--- a/tests/functionality/test_fb_oauth.py
+++ b/tests/unittests/functionality/test_fb_oauth.py
@@ -1,11 +1,11 @@
 import unittest
 
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
 from app import current_app as app
 from app.helpers.oauth import FbOAuth
 from app.helpers.data import get_facebook_auth
-from tests.auth_helper import login, logout, register
+from tests.unittests.auth_helper import login, logout, register
 from app.helpers.data import create_user_oauth
 
 
@@ -28,7 +28,7 @@ def test_user_already_logged_in(self):
             logout(self.app)
             login(self.app, 'email@gmail.com', 'test')
             self.assertTrue('Open Event' in self.app.get('/fCallback/?code=dummy_code&state=dummy_state',
-                                                           follow_redirects=True).data)
+                                                         follow_redirects=True).data)
             self.assertEqual(self.app.get('/fCallback/?code=dummy_code&state=dummy_state').status_code, 302)
 
     def test_error_return(self):
diff --git a/tests/functionality/test_file_upload_in_sessions.py b/tests/unittests/functionality/test_file_upload_in_sessions.py
similarity index 86%
rename from tests/functionality/test_file_upload_in_sessions.py
rename to tests/unittests/functionality/test_file_upload_in_sessions.py
--- a/tests/functionality/test_file_upload_in_sessions.py
+++ b/tests/unittests/functionality/test_file_upload_in_sessions.py
@@ -1,9 +1,7 @@
 import unittest
 
-from flask import url_for
-
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
 from StringIO import StringIO
 from app import current_app as app
 
diff --git a/tests/functionality/test_get_session_by_id.py b/tests/unittests/functionality/test_get_session_by_id.py
similarity index 79%
rename from tests/functionality/test_get_session_by_id.py
rename to tests/unittests/functionality/test_get_session_by_id.py
--- a/tests/functionality/test_get_session_by_id.py
+++ b/tests/unittests/functionality/test_get_session_by_id.py
@@ -1,7 +1,6 @@
 import unittest
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
-from tests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 
diff --git a/tests/functionality/test_get_speaker_by_id.py b/tests/unittests/functionality/test_get_speaker_by_id.py
similarity index 81%
rename from tests/functionality/test_get_speaker_by_id.py
rename to tests/unittests/functionality/test_get_speaker_by_id.py
--- a/tests/functionality/test_get_speaker_by_id.py
+++ b/tests/unittests/functionality/test_get_speaker_by_id.py
@@ -1,6 +1,6 @@
 import unittest
-from tests.utils import OpenEventTestCase
-from tests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 
diff --git a/tests/functionality/test_google_oauth.py b/tests/unittests/functionality/test_google_oauth.py
similarity index 90%
rename from tests/functionality/test_google_oauth.py
rename to tests/unittests/functionality/test_google_oauth.py
--- a/tests/functionality/test_google_oauth.py
+++ b/tests/unittests/functionality/test_google_oauth.py
@@ -1,12 +1,12 @@
 import unittest
 
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
 from app import current_app as app
 from oauthlib.oauth2 import WebApplicationClient
 from app.helpers.oauth import OAuth
 from app.helpers.data import get_google_auth
-from tests.auth_helper import login, logout, register
+from tests.unittests.auth_helper import login, logout, register
 
 
 class TestGoogleOauth(OpenEventTestCase):
@@ -21,7 +21,7 @@ def test_user_already_logged_in(self):
             logout(self.app)
             login(self.app, 'email@gmail.com', 'test')
             self.assertTrue('Open Event' in self.app.get('/gCallback/?state=dummy_state&code=dummy_code',
-                                                           follow_redirects=True).data)
+                                                         follow_redirects=True).data)
             self.assertEqual(self.app.get('/gCallback/?state=dummy_state&code=dummy_code').status_code, 302)
 
     def test_redirect(self):
diff --git a/tests/functionality/test_helper.py b/tests/unittests/functionality/test_helper.py
similarity index 88%
rename from tests/functionality/test_helper.py
rename to tests/unittests/functionality/test_helper.py
--- a/tests/functionality/test_helper.py
+++ b/tests/unittests/functionality/test_helper.py
@@ -1,14 +1,14 @@
 """Copyright 2015 Rafal Kowalski"""
 import unittest
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 from mock import patch
 
-from tests.object_mother import ObjectMother
-from tests.setup_database import Setup
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.setup_database import Setup
 from app import current_app as app
 from app.models import db
 from app.models.version import Version
-from app.helpers.data import DataManager, update_version, save_to_db
+from app.helpers.data import DataManager, update_version
 
 
 class TestDataManager(OpenEventTestCase):
diff --git a/tests/functionality/test_login.py b/tests/unittests/functionality/test_login.py
similarity index 89%
rename from tests/functionality/test_login.py
rename to tests/unittests/functionality/test_login.py
--- a/tests/functionality/test_login.py
+++ b/tests/unittests/functionality/test_login.py
@@ -1,9 +1,9 @@
 """Copyright 2015 Rafal Kowalski"""
 import unittest
 
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
-from tests.auth_helper import register, logout, login
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.auth_helper import register, logout, login
 from app import current_app as app
 
 
diff --git a/tests/functionality/test_microlocation.py b/tests/unittests/functionality/test_microlocation.py
similarity index 86%
rename from tests/functionality/test_microlocation.py
rename to tests/unittests/functionality/test_microlocation.py
--- a/tests/functionality/test_microlocation.py
+++ b/tests/unittests/functionality/test_microlocation.py
@@ -1,7 +1,7 @@
 import unittest
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
-from tests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 from app.models.microlocation import Microlocation
diff --git a/tests/functionality/test_model_unicode.py b/tests/unittests/functionality/test_model_unicode.py
similarity index 96%
rename from tests/functionality/test_model_unicode.py
rename to tests/unittests/functionality/test_model_unicode.py
--- a/tests/functionality/test_model_unicode.py
+++ b/tests/unittests/functionality/test_model_unicode.py
@@ -2,8 +2,8 @@
 from datetime import datetime
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
 
 from app import current_app as app
 from app.helpers.data import save_to_db
diff --git a/tests/functionality/test_pages.py b/tests/unittests/functionality/test_pages.py
similarity index 87%
rename from tests/functionality/test_pages.py
rename to tests/unittests/functionality/test_pages.py
--- a/tests/functionality/test_pages.py
+++ b/tests/unittests/functionality/test_pages.py
@@ -1,13 +1,10 @@
 # -*- coding: utf-8 -*-
-from datetime import datetime
 import unittest
 
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
-from flask import url_for, request
-import requests
-from tests.auth_helper import register, login
+from flask import request
 from jinja2 import TemplateNotFound
 
 class TestPagesUrls(OpenEventTestCase):
diff --git a/tests/functionality/test_profile_img_upload.py b/tests/unittests/functionality/test_profile_img_upload.py
similarity index 84%
rename from tests/functionality/test_profile_img_upload.py
rename to tests/unittests/functionality/test_profile_img_upload.py
--- a/tests/functionality/test_profile_img_upload.py
+++ b/tests/unittests/functionality/test_profile_img_upload.py
@@ -1,6 +1,5 @@
-import unittest
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
 from StringIO import StringIO
 from app import current_app as app
 
diff --git a/tests/functionality/test_restore_trash.py b/tests/unittests/functionality/test_restore_trash.py
similarity index 86%
rename from tests/functionality/test_restore_trash.py
rename to tests/unittests/functionality/test_restore_trash.py
--- a/tests/functionality/test_restore_trash.py
+++ b/tests/unittests/functionality/test_restore_trash.py
@@ -1,14 +1,12 @@
 import unittest
 from datetime import datetime
-from tests.auth_helper import login
-from tests.utils import OpenEventTestCase
-from tests.setup_database import Setup
-from tests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
+from tests.unittests.setup_database import Setup
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
-from flask import url_for
 from app.models.event import Event
-from app.helpers.data import DataManager, trash_session, restore_event, restore_session, restore_user
+from app.helpers.data import restore_event, restore_session, restore_user
 from app.models.user import User
 from app.models.session import Session
 
diff --git a/tests/functionality/test_session.py b/tests/unittests/functionality/test_session.py
similarity index 73%
rename from tests/functionality/test_session.py
rename to tests/unittests/functionality/test_session.py
--- a/tests/functionality/test_session.py
+++ b/tests/unittests/functionality/test_session.py
@@ -1,12 +1,10 @@
 """Copyright 2015 Rafal Kowalski"""
 import unittest
-from tests.auth_helper import login
-from tests.setup_database import Setup
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 
 class TestSessionApi(OpenEventViewTestCase):
diff --git a/tests/functionality/test_session_type.py b/tests/unittests/functionality/test_session_type.py
similarity index 91%
rename from tests/functionality/test_session_type.py
rename to tests/unittests/functionality/test_session_type.py
--- a/tests/functionality/test_session_type.py
+++ b/tests/unittests/functionality/test_session_type.py
@@ -1,11 +1,11 @@
 import unittest
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 from app.models.session_type import SessionType
 from app.models.session import Session
-from tests.setup_database import Setup
+from tests.unittests.setup_database import Setup
 from app import current_app as app
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from datetime import datetime
 
 
diff --git a/tests/functionality/test_social_link.py b/tests/unittests/functionality/test_social_link.py
similarity index 85%
rename from tests/functionality/test_social_link.py
rename to tests/unittests/functionality/test_social_link.py
--- a/tests/functionality/test_social_link.py
+++ b/tests/unittests/functionality/test_social_link.py
@@ -1,10 +1,10 @@
 import unittest
-from tests.utils import OpenEventTestCase
+from tests.unittests.utils import OpenEventTestCase
 from app.models.social_link import SocialLink
-from tests.setup_database import Setup
+from tests.unittests.setup_database import Setup
 from app import current_app as app
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 
 
 class TestSocialLink(OpenEventTestCase):
diff --git a/tests/object_mother.py b/tests/unittests/object_mother.py
similarity index 100%
rename from tests/object_mother.py
rename to tests/unittests/object_mother.py
diff --git a/tests/setup_database.py b/tests/unittests/setup_database.py
similarity index 100%
rename from tests/setup_database.py
rename to tests/unittests/setup_database.py
diff --git a/tests/test_db_performance.py b/tests/unittests/test_db_performance.py
similarity index 94%
rename from tests/test_db_performance.py
rename to tests/unittests/test_db_performance.py
--- a/tests/test_db_performance.py
+++ b/tests/unittests/test_db_performance.py
@@ -4,15 +4,14 @@
 from flask import url_for
 from werkzeug.contrib.profiler import ProfilerMiddleware
 
-from tests.views.view_test_case import OpenEventTestCase
+from tests.unittests.views.view_test_case import OpenEventTestCase
 from app.models import db
 from app import current_app as app
-from app.helpers.data import save_to_db
 from populate_db import populate
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from flask.ext.sqlalchemy import get_debug_queries
 from config import ProductionConfig
-from tests.setup_database import Setup
+from tests.unittests.setup_database import Setup
 
 class TestEvents(OpenEventTestCase):
     def setUp(self):
diff --git a/tests/utils.py b/tests/unittests/utils.py
similarity index 77%
rename from tests/utils.py
rename to tests/unittests/utils.py
--- a/tests/utils.py
+++ b/tests/unittests/utils.py
@@ -1,5 +1,5 @@
 import unittest
-from tests.setup_database import Setup
+from tests.unittests.setup_database import Setup
 
 class OpenEventTestCase(unittest.TestCase):
     def setUp(self):
diff --git a/tests/views/__init__.py b/tests/unittests/views/__init__.py
similarity index 100%
rename from tests/views/__init__.py
rename to tests/unittests/views/__init__.py
diff --git a/tests/views/admin/__init__.py b/tests/unittests/views/admin/__init__.py
similarity index 100%
rename from tests/views/admin/__init__.py
rename to tests/unittests/views/admin/__init__.py
diff --git a/tests/views/admin/test_events.py b/tests/unittests/views/admin/test_events.py
similarity index 98%
rename from tests/views/admin/test_events.py
rename to tests/unittests/views/admin/test_events.py
--- a/tests/views/admin/test_events.py
+++ b/tests/unittests/views/admin/test_events.py
@@ -1,7 +1,7 @@
 import unittest
 
-from tests.api.utils_post_data import POST_EVENT_DATA
-from tests.object_mother import ObjectMother
+from tests.unittests.api.utils_post_data import POST_EVENT_DATA
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 from app.models.modules import Module
@@ -10,7 +10,7 @@
 from app.api.events import EVENT_POST
 from flask import url_for
 
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 from werkzeug.datastructures import ImmutableMultiDict
 
 
diff --git a/tests/views/admin/test_export.py b/tests/unittests/views/admin/test_export.py
similarity index 81%
rename from tests/views/admin/test_export.py
rename to tests/unittests/views/admin/test_export.py
--- a/tests/views/admin/test_export.py
+++ b/tests/unittests/views/admin/test_export.py
@@ -3,9 +3,9 @@
 from flask import url_for
 
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 class TestExport(OpenEventViewTestCase):
     def test_export_view(self):
diff --git a/tests/views/admin/test_my_session.py b/tests/unittests/views/admin/test_my_session.py
similarity index 95%
rename from tests/views/admin/test_my_session.py
rename to tests/unittests/views/admin/test_my_session.py
--- a/tests/views/admin/test_my_session.py
+++ b/tests/unittests/views/admin/test_my_session.py
@@ -6,9 +6,9 @@
 from app.helpers.data import save_to_db
 from app.models.session import Session
 from app.models.speaker import Speaker
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 
 class TestMySession(OpenEventViewTestCase):
diff --git a/tests/views/admin/test_my_tickets.py b/tests/unittests/views/admin/test_my_tickets.py
similarity index 89%
rename from tests/views/admin/test_my_tickets.py
rename to tests/unittests/views/admin/test_my_tickets.py
--- a/tests/views/admin/test_my_tickets.py
+++ b/tests/unittests/views/admin/test_my_tickets.py
@@ -6,8 +6,8 @@
 from app.helpers.data import save_to_db
 from app.helpers.ticketing import TicketingManager
 from app import current_app as app
-from tests.views.guest.test_ticketing import create_order
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.guest.test_ticketing import create_order
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 class TestMySession(OpenEventViewTestCase):
 
diff --git a/tests/views/admin/test_profile.py b/tests/unittests/views/admin/test_profile.py
similarity index 96%
rename from tests/views/admin/test_profile.py
rename to tests/unittests/views/admin/test_profile.py
--- a/tests/views/admin/test_profile.py
+++ b/tests/unittests/views/admin/test_profile.py
@@ -5,7 +5,7 @@
 from app import current_app as app
 from app.models.notifications import Notification
 from app.helpers.data import DataManager
-from tests.views.view_test_case import OpenEventViewTestCase, get_or_create_super_admin
+from tests.unittests.views.view_test_case import OpenEventViewTestCase, get_or_create_super_admin
 
 
 class TestProfile(OpenEventViewTestCase):
diff --git a/tests/views/admin/test_roles.py b/tests/unittests/views/admin/test_roles.py
similarity index 95%
rename from tests/views/admin/test_roles.py
rename to tests/unittests/views/admin/test_roles.py
--- a/tests/views/admin/test_roles.py
+++ b/tests/unittests/views/admin/test_roles.py
@@ -7,9 +7,9 @@
 from app.models.role_invite import RoleInvite
 from populate_db import populate
 from app.helpers.data_getter import DataGetter
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 from app.models.users_events_roles import UsersEventsRoles
 
 class TestRoles(OpenEventViewTestCase):
diff --git a/tests/views/admin/test_scheduler.py b/tests/unittests/views/admin/test_scheduler.py
similarity index 88%
rename from tests/views/admin/test_scheduler.py
rename to tests/unittests/views/admin/test_scheduler.py
--- a/tests/views/admin/test_scheduler.py
+++ b/tests/unittests/views/admin/test_scheduler.py
@@ -3,9 +3,9 @@
 from flask import url_for
 
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 from app.helpers.data_getter import DataGetter
 
 
diff --git a/tests/views/admin/test_session.py b/tests/unittests/views/admin/test_session.py
similarity index 96%
rename from tests/views/admin/test_session.py
rename to tests/unittests/views/admin/test_session.py
--- a/tests/views/admin/test_session.py
+++ b/tests/unittests/views/admin/test_session.py
@@ -1,13 +1,13 @@
 """Copyright 2015 Rafal Kowalski"""
 import unittest
 
-from tests.api.utils_post_data import POST_SESSION_DATA, POST_SPEAKER_DATA
-from tests.object_mother import ObjectMother
+from tests.unittests.api.utils_post_data import POST_SESSION_DATA, POST_SPEAKER_DATA
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 from flask import url_for
 
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 
 class TestSessionApi(OpenEventViewTestCase):
diff --git a/tests/views/admin/test_settings.py b/tests/unittests/views/admin/test_settings.py
similarity index 96%
rename from tests/views/admin/test_settings.py
rename to tests/unittests/views/admin/test_settings.py
--- a/tests/views/admin/test_settings.py
+++ b/tests/unittests/views/admin/test_settings.py
@@ -4,9 +4,9 @@
 from flask import url_for
 
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 from app.helpers.data_getter import DataGetter
 
 def basic_setup(super_admin):
diff --git a/tests/views/admin/test_speakers.py b/tests/unittests/views/admin/test_speakers.py
similarity index 96%
rename from tests/views/admin/test_speakers.py
rename to tests/unittests/views/admin/test_speakers.py
--- a/tests/views/admin/test_speakers.py
+++ b/tests/unittests/views/admin/test_speakers.py
@@ -1,12 +1,12 @@
 """Copyright 2015 Rafal Kowalski"""
 import unittest
 
-from tests.object_mother import ObjectMother
+from tests.unittests.object_mother import ObjectMother
 from app import current_app as app
 from app.helpers.data import save_to_db
 from flask import url_for
 
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 
 class TestSpeakers(OpenEventViewTestCase):
diff --git a/tests/views/admin/test_tickets_stats.py b/tests/unittests/views/admin/test_tickets_stats.py
similarity index 97%
rename from tests/views/admin/test_tickets_stats.py
rename to tests/unittests/views/admin/test_tickets_stats.py
--- a/tests/views/admin/test_tickets_stats.py
+++ b/tests/unittests/views/admin/test_tickets_stats.py
@@ -7,9 +7,9 @@
 from app.helpers.data import save_to_db
 from app.helpers.ticketing import TicketingManager
 from app import current_app as app
-from tests.object_mother import ObjectMother
-from tests.views.guest.test_ticketing import get_event_ticket
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.views.guest.test_ticketing import get_event_ticket
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 def create_order(self):
     event, ticket = get_event_ticket()
diff --git a/tests/views/guest/__init__.py b/tests/unittests/views/guest/__init__.py
similarity index 100%
rename from tests/views/guest/__init__.py
rename to tests/unittests/views/guest/__init__.py
diff --git a/tests/views/guest/test_guest_event_page.py b/tests/unittests/views/guest/test_guest_event_page.py
similarity index 98%
rename from tests/views/guest/test_guest_event_page.py
rename to tests/unittests/views/guest/test_guest_event_page.py
--- a/tests/views/guest/test_guest_event_page.py
+++ b/tests/unittests/views/guest/test_guest_event_page.py
@@ -5,8 +5,8 @@
 
 from app.helpers.data import save_to_db
 from app.models.call_for_papers import CallForPaper
-from tests.object_mother import ObjectMother
-from tests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
 
 class TestGuestEventPage(OpenEventTestCase):
diff --git a/tests/views/guest/test_invoicing.py b/tests/unittests/views/guest/test_invoicing.py
similarity index 98%
rename from tests/views/guest/test_invoicing.py
rename to tests/unittests/views/guest/test_invoicing.py
--- a/tests/views/guest/test_invoicing.py
+++ b/tests/unittests/views/guest/test_invoicing.py
@@ -8,8 +8,8 @@
 from app.helpers.data import save_to_db
 from app.models.event_invoice import EventInvoice
 from app.settings import set_settings
-from tests.object_mother import ObjectMother
-from tests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
 from app.helpers.invoicing import InvoicingManager
 
diff --git a/tests/views/guest/test_search.py b/tests/unittests/views/guest/test_search.py
similarity index 98%
rename from tests/views/guest/test_search.py
rename to tests/unittests/views/guest/test_search.py
--- a/tests/views/guest/test_search.py
+++ b/tests/unittests/views/guest/test_search.py
@@ -5,8 +5,8 @@
 from flask import url_for
 
 from app.helpers.data import save_to_db
-from tests.object_mother import ObjectMother
-from tests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
 from app.helpers.flask_helpers import slugify
 
diff --git a/tests/views/guest/test_sitemaps.py b/tests/unittests/views/guest/test_sitemaps.py
similarity index 89%
rename from tests/views/guest/test_sitemaps.py
rename to tests/unittests/views/guest/test_sitemaps.py
--- a/tests/views/guest/test_sitemaps.py
+++ b/tests/unittests/views/guest/test_sitemaps.py
@@ -2,10 +2,10 @@
 
 from app.helpers.data import save_to_db
 from app.models.page import Page
-from tests.object_mother import ObjectMother
-from tests.auth_helper import register
-from tests.setup_database import Setup
-from tests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.auth_helper import register
+from tests.unittests.setup_database import Setup
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
 
 
diff --git a/tests/views/guest/test_ticketing.py b/tests/unittests/views/guest/test_ticketing.py
similarity index 98%
rename from tests/views/guest/test_ticketing.py
rename to tests/unittests/views/guest/test_ticketing.py
--- a/tests/views/guest/test_ticketing.py
+++ b/tests/unittests/views/guest/test_ticketing.py
@@ -11,8 +11,8 @@
 from app.models.stripe_authorization import StripeAuthorization
 from app.models.ticket import Ticket
 from app.settings import set_settings
-from tests.object_mother import ObjectMother
-from tests.utils import OpenEventTestCase
+from tests.unittests.object_mother import ObjectMother
+from tests.unittests.utils import OpenEventTestCase
 from app import current_app as app
 from app.helpers.ticketing import TicketingManager
 
diff --git a/tests/views/super_admin/__init__.py b/tests/unittests/views/super_admin/__init__.py
similarity index 100%
rename from tests/views/super_admin/__init__.py
rename to tests/unittests/views/super_admin/__init__.py
diff --git a/tests/views/super_admin/test_super_admin.py b/tests/unittests/views/super_admin/test_super_admin.py
similarity index 85%
rename from tests/views/super_admin/test_super_admin.py
rename to tests/unittests/views/super_admin/test_super_admin.py
--- a/tests/views/super_admin/test_super_admin.py
+++ b/tests/unittests/views/super_admin/test_super_admin.py
@@ -2,9 +2,9 @@
 
 from flask import url_for
 
-from tests.auth_helper import logout, login, register
+from tests.unittests.auth_helper import logout, login, register
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
 
 
 class TestSuperAdmin(OpenEventViewTestCase):
diff --git a/tests/views/super_admin/test_super_admin_views.py b/tests/unittests/views/super_admin/test_super_admin_views.py
similarity index 95%
rename from tests/views/super_admin/test_super_admin_views.py
rename to tests/unittests/views/super_admin/test_super_admin_views.py
--- a/tests/views/super_admin/test_super_admin_views.py
+++ b/tests/unittests/views/super_admin/test_super_admin_views.py
@@ -3,8 +3,8 @@
 from flask import url_for
 
 from app import current_app as app
-from tests.views.view_test_case import OpenEventViewTestCase
-from tests.object_mother import ObjectMother
+from tests.unittests.views.view_test_case import OpenEventViewTestCase
+from tests.unittests.object_mother import ObjectMother
 from app.helpers.data import save_to_db
 from app.helpers.data_getter import DataGetter
 
diff --git a/tests/views/view_test_case.py b/tests/unittests/views/view_test_case.py
similarity index 80%
rename from tests/views/view_test_case.py
rename to tests/unittests/views/view_test_case.py
--- a/tests/views/view_test_case.py
+++ b/tests/unittests/views/view_test_case.py
@@ -1,8 +1,8 @@
 
 from app.helpers.data_getter import DataGetter
-from tests import OpenEventTestCase
-from tests.auth_helper import create_super_admin, login
-from tests.setup_database import Setup
+from tests.unittests import OpenEventTestCase
+from tests.unittests.auth_helper import create_super_admin, login
+from tests.unittests.setup_database import Setup
 from app import current_app as app
 
 def get_or_create_super_admin():