Beispiel #1
0
    def test_cluster(self, db):
        root = Cluster.objects.get()
        regular = Cluster.objects.create()

        regular_icon = sxconsole.icon(regular)
        assert 'fa-globe' not in regular_icon
        assert 'fa-server' in regular_icon

        root_icon = sxconsole.icon(root)
        assert 'fa-globe' in root_icon
        assert 'fa-server' not in root_icon
Beispiel #2
0
 def test_cluster(self):
     regular_icon = sxconsole.icon(cluster)
     assert 'fa-globe' not in regular_icon
     assert 'fa-server' in regular_icon
Beispiel #3
0
 def test_invalid(self):
     with pytest.raises(TypeError):
         sxconsole.icon(object())