コード例 #1
0
ファイル: test_models.py プロジェクト: mrbhandari/jobsearch
    def test_suggestion_when_address_provided(self):
        Address.objects.create(user=self.user, address_line_one="12345 Test Ave")
        suggestions = Address.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 1)
        suggestion = suggestions[0]
        self.assertEqual(suggestion["msg"], "Do you need to update your address from 12345 Test" + " Ave?")
        self.assertEqual(suggestion["priority"], 1)
コード例 #2
0
ファイル: test_models.py プロジェクト: mrbhandari/jobsearch
    def test_suggestion_when_address_blank(self):

        suggestions = Address.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 1)
        suggestion = suggestions[0]
        self.assertEqual(suggestion["msg"], "Would you like to provide your address?")
        self.assertEqual(suggestion["priority"], 5)
コード例 #3
0
ファイル: test_models.py プロジェクト: supervisitor20/MyJobs
    def test_suggestion_when_address_blank(self):

        suggestions = Address.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 1)
        suggestion = suggestions[0]
        self.assertEqual(suggestion['msg'],
                         "Would you like to provide your address?")
        self.assertEqual(suggestion['priority'], 5)
コード例 #4
0
ファイル: test_models.py プロジェクト: supervisitor20/MyJobs
    def test_suggestion_when_address_provided(self):
        Address.objects.create(user=self.user,
                               address_line_one="12345 Test Ave")
        suggestions = Address.get_suggestion(self.user)

        self.assertEqual(len(suggestions), 1)
        suggestion = suggestions[0]
        self.assertEqual(
            suggestion['msg'],
            "Do you need to update your address from 12345 Test" + " Ave?")
        self.assertEqual(suggestion['priority'], 1)