Example #1
0
from jobplus import create_app

app = create_app('development')

if __name__ == '__main__':
    app.run()
Example #2
0
import json
from jobplus.models import User, Company, Job, db
from jobplus import create_app
from faker import Faker

app = create_app("development")
app.app_context().push()
faker = Faker()


# 生成一个用户boss
def create_boss(company):
    user = User(username="******",
                email='*****@*****.**',
                password='******',
                role=User.ROLE_BOSS)
    user.company = company
    return user


def item_jobs():
    with open("jobs.json", 'r', encoding="utf8") as f:
        jobs = json.load(f)
        print(jobs)
        job_list = []
        company_list = []
        for job in jobs:
            company = Company(name=job["company"],
                              address=job["address"],
                              net_site=job["net_site"],
                              logo=job["logo"],
Example #3
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.create_all()
     self.browser = webdriver.Firefox()
Example #4
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.create_all()
     self.client = self.app.test_client(use_cookies=True)
Example #5
0
 def setUp(self):
     self.app = create_app('testing')
     self.app_context = self.app.app_context()
     self.app_context.push()
     db.create_all()