@@ -105,26 +105,6 @@ def test_receive(self):
105105 self .assertEqual (self .node_model .objects .count (), 2 )
106106 self .assertEqual (self .link_model .objects .count (), 1 )
107107
108- def test_receive_with_deprecated_url (self ):
109- self ._set_receive ()
110- self .node_model .objects .all ().delete ()
111- data = self ._load ('static/netjson-1-link.json' )
112- t = self .topology_model .objects .first ()
113- path = reverse ('receive_topology_deprecated' , args = [t .pk ])
114- path = f'{ path } ?key=test'
115- response = self .client .post (path , data = data , content_type = 'text/plain' )
116- self .assertEqual (response .status_code , 200 )
117- expected_path = reverse ('receive_topology' , args = [t .pk ])
118- expected_path = f'{ expected_path } ?key=test'
119- message = (
120- 'data received successfully. '
121- 'This URL is depercated and will be removed in '
122- f'future versions, use { expected_path } '
123- )
124- self .assertEqual (response .data ['detail' ], message )
125- self .assertEqual (self .node_model .objects .count (), 2 )
126- self .assertEqual (self .link_model .objects .count (), 1 )
127-
128108 def test_receive_404 (self ):
129109 # topology is set to FETCH strategy
130110 response = self .client .post (self .receive_url , content_type = 'text/plain' )
0 commit comments