def test_l_comprobar_numero_redes(self):
     self.assertEqual(IPContainer.getNumberOfNetworks(), 1,
                      "1 - Numero de redes correcto. (1)")
     IPContainer.createNetwork("test_user3", "wlan")
     self.assertEqual(IPContainer.getNumberOfNetworks(), 2,
                      "2 - Numero de redes correcto. (2)")
Exemple #2
0
def getNumberOfNetworks(current_user):
    return jsonify(networks=IPContainer.getNumberOfNetworks())