'Bug 1306087: Accept two-letter country-localized stackoverflow
domains but not meta.stackoverflow.com.'

def test_stackoverflow_urls(self):

    user = self.user_model.objects.get(username='testuser')
    valid_stackoverflow_urls = ['https://stackoverflow.com/users/testuser', 'https://es.stackoverflow.com/users/testuser']
    for valid_url in valid_stackoverflow_urls:
        user.stackoverflow_url = valid_url
        user.full_clean()
    invalid_stackoverflow_urls = ['https://1a.stackoverflow.com/users/testuser', 'https://meta.stackoverflow.com/users/testuser']
    for invalid_url in invalid_stackoverflow_urls:
        user.stackoverflow_url = invalid_url
        with self.assertRaises(ValidationError):
            user.full_clean()
