def _initialize_system():
    # Authentication
    AuthenticationInterface.remove_all_authentication_methods()
    AuthenticationInterface.add_authentication_method(AuthenticationMethodBasic())

    # Database
    DatabaseInterface.load_database_plugin(DatabaseSqlite("database.db"))
def _initialize_system():
    # Authentication
    AuthenticationInterface.remove_all_authentication_methods()
    AuthenticationInterface.add_authentication_method(
        AuthenticationMethodBasic())

    # Database
    DatabaseInterface.load_database_plugin(DatabaseSqlite("database.db"))
    def setUp(self):
        # Authentication
        AuthenticationInterface.remove_all_authentication_methods()
        AuthenticationInterface.add_authentication_method(AuthenticationMethodBasic())

        # Database
        DatabaseInterface.load_database_plugin(DatabaseSqlite("database.db"))
        DatabaseInterface.create_new_database()

        # Data members
        self.__admin_user_id = 1
    def setUp(self):
        # Authentication
        AuthenticationInterface.remove_all_authentication_methods()
        AuthenticationInterface.add_authentication_method(
            AuthenticationMethodBasic())

        # Database
        DatabaseInterface.load_database_plugin(DatabaseSqlite("database.db"))
        DatabaseInterface.create_new_database()

        # Data members
        self.__admin_user_id = 1
Ejemplo n.º 5
0
from authentication.authentication import AuthenticationInterface
from authentication.basic_authentication_method import AuthenticationMethodBasic
from database.database import DatabaseInterface
from plugins.database.sqlite.database import DatabaseSqlite
import rest_api

if __name__ == '__main__':
    # Authentication
    AuthenticationInterface.remove_all_authentication_methods()
    AuthenticationInterface.add_authentication_method(
        AuthenticationMethodBasic())

    # Database
    DatabaseInterface.load_database_plugin(DatabaseSqlite("database.db"))
    DatabaseInterface.create_new_database()

    # Start server
    rest_api.app.run(debug=True)
Ejemplo n.º 6
0
from authentication.authentication import AuthenticationInterface
from authentication.basic_authentication_method import AuthenticationMethodBasic
from database.database import DatabaseInterface
from plugins.database.sqlite.database import DatabaseSqlite
import rest_api

if __name__ == '__main__':
    # Authentication
    AuthenticationInterface.remove_all_authentication_methods()
    AuthenticationInterface.add_authentication_method(AuthenticationMethodBasic())

    # Database
    DatabaseInterface.load_database_plugin(DatabaseSqlite("database.db"))
    DatabaseInterface.create_new_database()

    # Start server
    rest_api.app.run(debug=True)