@@ -66,10 +66,17 @@ def test_layer(self):
6666 response = self .client .get (url )
6767 self .assertEqual (response .status_code , 200 )
6868 self .assertEqual (response .data ['id' ], layer_id )
69- body = {'config' : {'new' : 'value' }}
69+ body = {'ssh_username' : 'otto_test' , ' config' : {'new' : 'value' }}
7070 response = self .client .patch (url , json .dumps (body ), content_type = 'application/json' )
7171 self .assertEqual (response .status_code , 200 )
72+ self .assertEqual ('otto_test' , response .data ['ssh_username' ])
7273 self .assertIn ('new' , response .data ['config' ])
74+ body = {'ssh_port' : 9999 , 'runtime' : False }
75+ response = self .client .patch (url , json .dumps (body ), content_type = 'application/json' )
76+ self .assertEqual (response .status_code , 200 )
77+ self .assertEqual ('otto_test' , response .data ['ssh_username' ])
78+ self .assertEqual (9999 , response .data ['ssh_port' ])
79+ self .assertFalse (response .data ['runtime' ])
7380 response = self .client .delete (url )
7481 self .assertEqual (response .status_code , 204 )
7582
0 commit comments