Ejemplo n.º 1
0
    def handle(self, *args, **options):
        url = options.get('url', None)
        language = options.get('language', '')

        if url:
            parse_url(url, language)
        else:
            print('Enter url using "-u" option')
    def handle(self, *args, **options):
        url = options.get('url', None)
        language = options.get('language', '')

        if url:
            parse_url(url, language)
        else:
            print('Enter url using "-u" option')
Ejemplo n.º 3
0
    def test_parse_url(self):
        result = parse_url(self.real_url, self.lang)
        self.assertEqual(result, 'success!')

        result = parse_url(self.fake_url, self.lang)
        self.assertEqual(result, 'error getting content from url')