Example #1
0
	def test_obre_diverses_classes(self):
		classes = (("A", "10", "1", "8", "T", "A5001"),
			("A", "11", "3", "12", "P", "A6002"),
			("B", "M", "3", "12", "P", "A6002"))
		servidor = self.Servidor(classes, 2)
		self._comprova_classes(dades.obre_http(), classes)
		servidor.espera_aturada()
Example #2
0
def actualitza():
    global _horaris, _carrera
    classes = dades.obre_http(_carrera)
    _assigs.clear()
    _afegeix_classes(classes)
    horaris_valids = set()
    for horari in _horaris:
        horaris_valids.add(_horari_valid(horari))
    horaris_valids.discard(tuple())
    _horaris = horaris_valids
Example #3
0
	def test_obre_una_classe(self):
		classes = (("A", "10", "1", "8", "T", "A5001"),)
		servidor = self.Servidor(classes, 2)
		self._comprova_classes(dades.obre_http(), classes)
		servidor.espera_aturada()
Example #4
0
	def test_obre_cap_classe(self):
		servidor = self.Servidor((), 1)
		self._comprova_classes(dades.obre_http(), ())
		servidor.espera_aturada()