Esempio n. 1
0
    def test_suggestion_when_phone_entered(self):
        phone = Telephone(user=self.user)
        phone.use_code = 'mobile'
        phone.save()

        # Get the actual results
        actual = Telephone.get_suggestion(self.user)

        self.assertEqual(actual, [])
Esempio n. 2
0
    def test_suggestion_when_phone_entered(self):
        phone = Telephone(user=self.user)
        phone.use_code = 'mobile'
        phone.save()

        # Get the actual results
        actual = Telephone.get_suggestion(self.user)

        self.assertEqual(actual, [])
Esempio n. 3
0
    def test_suggestion_when_phone_blank(self):
        expected = [{'msg': 'Would you like to add a telephone?',
                    'priority': 5,
                    'module': 'Telephone',
                    'url': reverse('handle_form') + '?module=Telephone&id=new'
                    }]

        actual = Telephone.get_suggestion(self.user)

        # Sort lists to ensure identical order
        self.assertEqual(actual, expected)
Esempio n. 4
0
    def test_suggestion_when_phone_blank(self):
        expected = [{
            'msg': 'Would you like to add a telephone?',
            'priority': 5,
            'module': 'Telephone',
            'url': reverse('handle_form') + '?module=Telephone&id=new'
        }]

        actual = Telephone.get_suggestion(self.user)

        # Sort lists to ensure identical order
        self.assertEqual(actual, expected)
Esempio n. 5
0
    def test_suggestion_when_phone_blank(self):
        expected = [
            {
                "msg": "Would you like to add a telephone?",
                "priority": 5,
                "module": "Telephone",
                "url": reverse("handle_form") + "?module=Telephone&id=new",
            }
        ]

        actual = Telephone.get_suggestion(self.user)

        # Sort lists to ensure identical order
        self.assertEqual(actual, expected)