def test_job_score_general_2(self):
     actual = job_score('2550746682')
     expected = {
         'skills': ['SQL', 'Spark', 'data pipeline', 'Python', 'AWS'],
         'scores': [2, 2, 2, 1, 1]
     }
     self.assertEqual(actual, expected)
def jobinfo(): 
    if request.method == 'GET': 
        # jobinfo
        title = request.args.get('type', type = str)
        jobinfo = models.jobinfo(title)
        # rec
        selected_job = request.args.get('choosejob', type = str)
        recommend = models.rec(str(selected_job))
        # score
        score_id = request.args.get('score', type = str)
        # score_id = '2528321227'
        score = models.job_score(str(score_id))
        print('score_id: ',score_id)
        print('score: ',score['skills'])
        # print(len(score['skills']))
        # trend
        trend = models.trend()

        return {'jobinfo':jobinfo,'recommend':recommend,'score':score,'trend':trend} #,'trend':trend
 def test_job_score_without_scores(self):
     actual = job_score('2507709258')
     expected = {'skills': [], 'scores': []}
     self.assertEqual(actual, expected)
 def test_job_score_general(self):
     actual = job_score('2546120842')
     expected = {'skills': ['SQL', 'Python', 'ETL'], 'scores': [1, 1, 1]}
     self.assertEqual(actual, expected)