Exemplo n.º 1
0
 def test_instantiates_correctly_with_device_id_and_optional_module_id(
         self):
     x509_cert_object = x509()
     x509_auth_provider = X509AuthenticationProvider(x509=x509_cert_object,
                                                     hostname=hostname,
                                                     device_id=device_id)
     assert x509_auth_provider.module_id is None
def make_x509_auth_provider_module():
    mock_x509 = X509(fake_x509_cert_file, fake_x509_cert_key_file,
                     fake_pass_phrase)
    return X509AuthenticationProvider(x509=mock_x509,
                                      hostname=fake_hostname,
                                      device_id=fake_device_id,
                                      module_id=fake_module_id)
Exemplo n.º 3
0
 def test_get_certificate(self):
     x509_cert_object = x509()
     x509_auth_provider = X509AuthenticationProvider(x509=x509_cert_object,
                                                     hostname=hostname,
                                                     device_id=device_id)
     assert x509_auth_provider.get_x509_certificate()
Exemplo n.º 4
0
 def test_instantiates_correctly_with_hostname(self):
     x509_cert_object = x509()
     x509_auth_provider = X509AuthenticationProvider(x509=x509_cert_object,
                                                     hostname=hostname,
                                                     device_id=device_id)
     assert x509_auth_provider.hostname == hostname