コード例 #1
0
 def test_of_type_package(self):
     """Test filtering clients of type package."""
     self.assertTrue(clients.of_type(syncthing_clients, 'package'))
     self.assertFalse(clients.of_type(tor_clients, 'package'))
コード例 #2
0
 def test_of_type_mobile(self):
     """Test filtering clients of type mobile."""
     self.assertTrue(clients.of_type(syncthing_clients, 'mobile'))
     self.assertFalse(clients.of_type(infinoted_clients, 'mobile'))
コード例 #3
0
 def test_of_type_desktop(self):
     """Test filtering clients of type desktop."""
     self.assertTrue(clients.of_type(syncthing_clients, 'desktop'))
     self.assertFalse(clients.of_type(deluge_clients, 'desktop'))
コード例 #4
0
ファイル: plinth_extras.py プロジェクト: JoKeyser/Plinth
def clients_of_type(clients, client_type):
    """Filter and get clients of a particular type"""
    return clients_module.of_type(clients, client_type)
コード例 #5
0
 def test_of_type_web(self):
     """Test filtering clients of type web."""
     self.assertTrue(clients.of_type(syncthing_clients, 'web'))
     self.assertFalse(clients.of_type(quassel_clients, 'web'))
コード例 #6
0
ファイル: test_clients.py プロジェクト: JoKeyser/Plinth
def test_of_type_desktop():
    """Test filtering clients of type desktop."""
    assert clients.of_type(syncthing_clients, 'desktop')
    assert not clients.of_type(deluge_clients, 'desktop')
コード例 #7
0
ファイル: test_clients.py プロジェクト: JoKeyser/Plinth
def test_of_type_package():
    """Test filtering clients of type package."""
    assert clients.of_type(syncthing_clients, 'package')
    assert not clients.of_type(tor_clients, 'package')
コード例 #8
0
ファイル: test_clients.py プロジェクト: JoKeyser/Plinth
def test_of_type_web():
    """Test filtering clients of type web."""
    assert clients.of_type(syncthing_clients, 'web')
    assert not clients.of_type(quassel_clients, 'web')
コード例 #9
0
ファイル: test_clients.py プロジェクト: JoKeyser/Plinth
def test_of_type_mobile():
    """Test filtering clients of type mobile."""
    assert clients.of_type(syncthing_clients, 'mobile')
    assert not clients.of_type(infinoted_clients, 'mobile')
コード例 #10
0
def clients_of_type(clients, client_type):
    """Filter and get clients of a particular type"""
    return clients_module.of_type(clients, client_type)
コード例 #11
0
 def test_of_type_package(self):
     """Test filtering clients of type package."""
     self.assertTrue(clients.of_type(syncthing_clients, 'package'))
     self.assertFalse(clients.of_type(tor_clients, 'package'))
コード例 #12
0
 def test_of_type_desktop(self):
     """Test filtering clients of type desktop."""
     self.assertTrue(clients.of_type(syncthing_clients, 'desktop'))
     self.assertFalse(clients.of_type(deluge_clients, 'desktop'))
コード例 #13
0
 def test_of_type_mobile(self):
     """Test filtering clients of type mobile."""
     self.assertTrue(clients.of_type(syncthing_clients, 'mobile'))
     self.assertFalse(clients.of_type(infinoted_clients, 'mobile'))
コード例 #14
0
 def test_of_type_web(self):
     """Test filtering clients of type web."""
     self.assertTrue(clients.of_type(syncthing_clients, 'web'))
     self.assertFalse(clients.of_type(quassel_clients, 'web'))