Kill the old project name in more places
parent
3aafd03531
commit
489c646b58
|
@ -1 +1,6 @@
|
||||||
# project/__init__.py
|
# kappa123/__init__.py
|
||||||
|
|
||||||
|
from kappa123.server import app
|
||||||
|
|
||||||
|
def bootup():
|
||||||
|
app.run()
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# project/server/__init__.py
|
# kappa123/server/__init__.py
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
@ -21,7 +21,7 @@ app = Flask(
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
app_settings = os.getenv('APP_SETTINGS', 'project.server.config.DevelopmentConfig')
|
app_settings = os.getenv('APP_SETTINGS', 'kappa123.server.config.DevelopmentConfig')
|
||||||
app.config.from_object(app_settings)
|
app.config.from_object(app_settings)
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ app.config.from_object(app_settings)
|
||||||
### blueprints ####
|
### blueprints ####
|
||||||
###################
|
###################
|
||||||
|
|
||||||
from project.server.main.views import main_blueprint
|
from kappa123.server.main.views import main_blueprint
|
||||||
app.register_blueprint(main_blueprint)
|
app.register_blueprint(main_blueprint)
|
||||||
|
|
||||||
########################
|
########################
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# project/server/config.py
|
# kappa123/server/config.py
|
||||||
|
|
||||||
import os
|
import os
|
||||||
basedir = os.path.abspath(os.path.dirname(__file__))
|
basedir = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
# project/server/main/__init__.py
|
# kappa123/server/main/__init__.py
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# project/server/main/views.py
|
# kappa123/server/main/views.py
|
||||||
|
|
||||||
|
|
||||||
#################
|
#################
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
# project/server/tests/__init__.py
|
# kappa123/server/tests/__init__.py
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
# project/server/tests/base.py
|
# kappa123/server/tests/base.py
|
||||||
|
|
||||||
|
|
||||||
from flask_testing import TestCase
|
from flask_testing import TestCase
|
||||||
|
|
||||||
from project.server import app, db
|
from kappa123.server import app, db
|
||||||
from project.server.models import User
|
from kappa123.server.models import User
|
||||||
|
|
||||||
|
|
||||||
class BaseTestCase(TestCase):
|
class BaseTestCase(TestCase):
|
||||||
|
|
||||||
def create_app(self):
|
def create_app(self):
|
||||||
app.config.from_object('project.server.config.TestingConfig')
|
app.config.from_object('kappa123.server.config.TestingConfig')
|
||||||
return app
|
return app
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# project/server/tests/test_config.py
|
# kappa123/server/tests/test_config.py
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
@ -6,13 +6,13 @@ import unittest
|
||||||
from flask import current_app
|
from flask import current_app
|
||||||
from flask_testing import TestCase
|
from flask_testing import TestCase
|
||||||
|
|
||||||
from project.server import app
|
from kappa123.server import app
|
||||||
|
|
||||||
|
|
||||||
class TestDevelopmentConfig(TestCase):
|
class TestDevelopmentConfig(TestCase):
|
||||||
|
|
||||||
def create_app(self):
|
def create_app(self):
|
||||||
app.config.from_object('project.server.config.DevelopmentConfig')
|
app.config.from_object('kappa123.server.config.DevelopmentConfig')
|
||||||
return app
|
return app
|
||||||
|
|
||||||
def test_app_is_development(self):
|
def test_app_is_development(self):
|
||||||
|
@ -26,7 +26,7 @@ class TestDevelopmentConfig(TestCase):
|
||||||
class TestTestingConfig(TestCase):
|
class TestTestingConfig(TestCase):
|
||||||
|
|
||||||
def create_app(self):
|
def create_app(self):
|
||||||
app.config.from_object('project.server.config.TestingConfig')
|
app.config.from_object('kappa123.server.config.TestingConfig')
|
||||||
return app
|
return app
|
||||||
|
|
||||||
def test_app_is_testing(self):
|
def test_app_is_testing(self):
|
||||||
|
@ -39,7 +39,7 @@ class TestTestingConfig(TestCase):
|
||||||
class TestProductionConfig(TestCase):
|
class TestProductionConfig(TestCase):
|
||||||
|
|
||||||
def create_app(self):
|
def create_app(self):
|
||||||
app.config.from_object('project.server.config.ProductionConfig')
|
app.config.from_object('kappa123.server.config.ProductionConfig')
|
||||||
return app
|
return app
|
||||||
|
|
||||||
def test_app_is_production(self):
|
def test_app_is_production(self):
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# project/server/tests/test_main.py
|
# kappa123/server/tests/test_main.py
|
||||||
|
|
||||||
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
# project/server/tests/test_user.py
|
# kappa123/server/tests/test_user.py
|
||||||
|
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
@ -7,9 +7,9 @@ import unittest
|
||||||
from flask_login import current_user
|
from flask_login import current_user
|
||||||
|
|
||||||
from base import BaseTestCase
|
from base import BaseTestCase
|
||||||
from project.server import bcrypt
|
from kappa123.server import bcrypt
|
||||||
from project.server.models import User
|
from kappa123.server.models import User
|
||||||
from project.server.user.forms import LoginForm
|
from kappa123.server.user.forms import LoginForm
|
||||||
|
|
||||||
|
|
||||||
class TestUserBlueprint(BaseTestCase):
|
class TestUserBlueprint(BaseTestCase):
|
||||||
|
|
Loading…
Reference in New Issue