コード例 #1
0
ファイル: test_utils.py プロジェクト: altai/altai-api
 def test_cidr_parses(self):
     self.assertEquals(cidr_from_user('192.168.1.0/24'), '192.168.1.0/24')
コード例 #2
0
ファイル: types.py プロジェクト: altai/altai-api
 def _from_request_impl(self, value):
     return cidr_from_user(value, on_error=self._illegal_element)
コード例 #3
0
ファイル: types.py プロジェクト: altai/altai-api
 def from_argument(self, value):
     return cidr_from_user(value, on_error=self._illegal_argument)
コード例 #4
0
ファイル: types.py プロジェクト: altai/altai-api
 def _from_request_impl(self, value):
     return cidr_from_user(value, on_error=self._illegal_element)
コード例 #5
0
ファイル: types.py プロジェクト: altai/altai-api
 def from_argument(self, value):
     return cidr_from_user(value, on_error=self._illegal_argument)
コード例 #6
0
ファイル: test_utils.py プロジェクト: altai/altai-api
 def test_cidr_parses(self):
     self.assertEquals(cidr_from_user("192.168.1.0/24"), "192.168.1.0/24")