コード例 #1
0
ファイル: security.py プロジェクト: yndxz/sentry
 def get_metadata(self, data):
     from sentry.interfaces.security import ExpectStaple
     expectstaple = ExpectStaple.to_python(data['expectstaple'])
     return {
         'origin': expectstaple.get_origin(),
         'message': expectstaple.get_message(),
     }
コード例 #2
0
ファイル: security.py プロジェクト: Kayle009/sentry
 def get_metadata(self):
     from sentry.interfaces.security import ExpectStaple
     expectstaple = ExpectStaple.to_python(self.data['expectstaple'])
     return {
         'origin': expectstaple.get_origin(),
         'message': expectstaple.get_message(),
     }
コード例 #3
0
ファイル: security.py プロジェクト: zvrr/sentry
    def get_metadata(self, data):
        from sentry.interfaces.security import ExpectStaple

        expectstaple = ExpectStaple.to_python(data["expectstaple"])
        return {
            "origin": expectstaple.get_origin(),
            "message": expectstaple.get_message()
        }
コード例 #4
0
 def test_serialize_unserialize_behavior(self):
     assert ExpectStaple.to_python(
         self.interface_json).to_json() == self.interface_json
コード例 #5
0
 def test_to_python(self):
     interface = ExpectStaple.to_python(self.interface_json)
     assert interface.hostname == 'www.example.com'
     assert interface.date_time == '2014-04-06T13:00:50Z'
     assert interface.port == 443
     assert len(interface.served_certificate_chain) == 1
コード例 #6
0
 def test_from_raw(self):
     interface = ExpectStaple.from_raw(self.raw_report)
     assert interface.hostname == 'www.example.com'
     assert interface.date_time == '2014-04-06T13:00:50Z'
     assert interface.port == 443
     assert len(interface.served_certificate_chain) == 1
コード例 #7
0
def test_from_raw(make_csp_snapshot):
    make_csp_snapshot(ExpectStaple.from_raw(raw_report).to_json())
コード例 #8
0
ファイル: test_security.py プロジェクト: alexandrul/sentry
 def test_serialize_unserialize_behavior(self):
     assert ExpectStaple.to_python(self.interface_json).to_json() == self.interface_json
コード例 #9
0
ファイル: test_security.py プロジェクト: alexandrul/sentry
 def test_to_python(self):
     interface = ExpectStaple.to_python(self.interface_json)
     assert interface.hostname == 'www.example.com'
     assert interface.date_time == '2014-04-06T13:00:50Z'
     assert interface.port == 443
     assert len(interface.served_certificate_chain) == 1
コード例 #10
0
ファイル: test_security.py プロジェクト: alexandrul/sentry
 def test_from_raw(self):
     interface = ExpectStaple.from_raw(self.raw_report)
     assert interface.hostname == 'www.example.com'
     assert interface.date_time == '2014-04-06T13:00:50Z'
     assert interface.port == 443
     assert len(interface.served_certificate_chain) == 1
コード例 #11
0
ファイル: test_expectstaple.py プロジェクト: yaoqi/sentry
def test_from_raw(make_csp_snapshot):
    make_csp_snapshot(ExpectStaple.from_raw(raw_report).to_json())