Revision 3d870b05 snf-cyclades-app/synnefo/api/tests/networks.py

b/snf-cyclades-app/synnefo/api/tests/networks.py
68 68
        self.assertEqual(response.status_code, 403)
69 69
        self.assertEqual(len(Network.objects.filter(userid='user1')), 0)
70 70

  
71
    def test_invalid_create2(self):
72
        """Test invalid name type"""
73
        request = {
74
            "network": {
75
                "type": "MAC_FILTERED",
76
                "name": ["Test"]
77
            }
78
        }
79
        response = self.post(NETWORKS_URL, params=json.dumps(request))
80
        code = response.status_code
81
        self.assertBarRequest(response)
82

  
71 83
    def test_create(self):
72 84
        request = {
73 85
            "network": {

Also available in: Unified diff