def test_get_analyze_with_categories():
    webpage = WebPage('http://example.com', '<html>aaa</html>', {})
    categories = {
        "1": {
            "name": "cat1",
            "priority": 1
        },
        "2": {
            "name": "cat2",
            "priority": 1
        }
    }

    technologies = {
        'a': {
            'html': 'aaa',
            'cats': [1],
        },
        'b': {
            'html': 'bbb',
            'cats': [1, 2],
        }
    }

    analyzer = Wappalyzer(categories=categories, technologies=technologies)
    result = analyzer.analyze_with_categories(webpage)

    assert result == {"a": {"categories": ["cat1"]}}
Beispiel #2
0
    def test_get_analyze_with_categories(self):
        webpage = WebPage('http://example.com', '<html>aaa</html>', {})
        analyzer = Wappalyzer(categories={"1": "cat1", "2": "cat2"}, apps={
            'a': {
                'html': 'aaa',
                'cats': [1],
            },
            'b': {
                'html': 'bbb',
                'cats': [1, 2],
            },
        })

        result = analyzer.analyze_with_categories(webpage)

        self.assertEquals(result, {"a": {"categories": ["cat1"]}})
Beispiel #3
0
    def test_get_analyze_with_categories(self):
        webpage = WebPage('http://example.com', '<html>aaa</html>', {})
        analyzer = Wappalyzer(categories={"1": "cat1", "2": "cat2"}, apps={
            'a': {
                'html': 'aaa',
                'cats': [1],
            },
            'b': {
                'html': 'bbb',
                'cats': [1, 2],
            },
        })

        result = analyzer.analyze_with_categories(webpage)

        self.assertEquals(result, {"a": {"categories": ["cat1"]}})