move x509 tests into a module (#3889)

* move x509 tests into a module

This is just to make grouping things like test_ocsp, etc a bit simpler
in the future

* fix path

* pep8
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py
index 3a73a37..3a847cd 100644
--- a/tests/hazmat/backends/test_openssl.py
+++ b/tests/hazmat/backends/test_openssl.py
@@ -31,10 +31,10 @@
 from ...doubles import (
     DummyAsymmetricPadding, DummyCipherAlgorithm, DummyHashAlgorithm, DummyMode
 )
-from ...test_x509 import _load_cert
 from ...utils import (
     load_nist_vectors, load_vectors_from_file, raises_unsupported_algorithm
 )
+from ...x509.test_x509 import _load_cert
 
 
 def skip_if_libre_ssl(openssl_version):
diff --git a/tests/x509/__init__.py b/tests/x509/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tests/x509/__init__.py
diff --git a/tests/test_x509.py b/tests/x509/test_x509.py
similarity index 99%
rename from tests/test_x509.py
rename to tests/x509/test_x509.py
index 5285436..533862a 100644
--- a/tests/test_x509.py
+++ b/tests/x509/test_x509.py
@@ -33,11 +33,11 @@
     NameOID, SignatureAlgorithmOID
 )
 
-from .hazmat.primitives.fixtures_dsa import DSA_KEY_2048
-from .hazmat.primitives.fixtures_ec import EC_KEY_SECP256R1
-from .hazmat.primitives.fixtures_rsa import RSA_KEY_2048, RSA_KEY_512
-from .hazmat.primitives.test_ec import _skip_curve_unsupported
-from .utils import load_vectors_from_file
+from ..hazmat.primitives.fixtures_dsa import DSA_KEY_2048
+from ..hazmat.primitives.fixtures_ec import EC_KEY_SECP256R1
+from ..hazmat.primitives.fixtures_rsa import RSA_KEY_2048, RSA_KEY_512
+from ..hazmat.primitives.test_ec import _skip_curve_unsupported
+from ..utils import load_vectors_from_file
 
 
 @utils.register_interface(x509.ExtensionType)
diff --git a/tests/test_x509_crlbuilder.py b/tests/x509/test_x509_crlbuilder.py
similarity index 98%
rename from tests/test_x509_crlbuilder.py
rename to tests/x509/test_x509_crlbuilder.py
index b3c789f..b90805f 100644
--- a/tests/test_x509_crlbuilder.py
+++ b/tests/x509/test_x509_crlbuilder.py
@@ -18,10 +18,10 @@
 from cryptography.hazmat.primitives.asymmetric import ec
 from cryptography.x509.oid import AuthorityInformationAccessOID, NameOID
 
-from .hazmat.primitives.fixtures_dsa import DSA_KEY_2048
-from .hazmat.primitives.fixtures_ec import EC_KEY_SECP256R1
-from .hazmat.primitives.fixtures_rsa import RSA_KEY_2048, RSA_KEY_512
-from .hazmat.primitives.test_ec import _skip_curve_unsupported
+from ..hazmat.primitives.fixtures_dsa import DSA_KEY_2048
+from ..hazmat.primitives.fixtures_ec import EC_KEY_SECP256R1
+from ..hazmat.primitives.fixtures_rsa import RSA_KEY_2048, RSA_KEY_512
+from ..hazmat.primitives.test_ec import _skip_curve_unsupported
 
 
 class TestCertificateRevocationListBuilder(object):
diff --git a/tests/test_x509_ext.py b/tests/x509/test_x509_ext.py
similarity index 99%
rename from tests/test_x509_ext.py
rename to tests/x509/test_x509_ext.py
index ee94faa..fc8651c 100644
--- a/tests/test_x509_ext.py
+++ b/tests/x509/test_x509_ext.py
@@ -25,9 +25,9 @@
     NameOID, ObjectIdentifier
 )
 
-from .hazmat.primitives.fixtures_rsa import RSA_KEY_2048
-from .hazmat.primitives.test_ec import _skip_curve_unsupported
 from .test_x509 import _load_cert
+from ..hazmat.primitives.fixtures_rsa import RSA_KEY_2048
+from ..hazmat.primitives.test_ec import _skip_curve_unsupported
 
 
 def _make_certbuilder(private_key):
diff --git a/tests/test_x509_revokedcertbuilder.py b/tests/x509/test_x509_revokedcertbuilder.py
similarity index 100%
rename from tests/test_x509_revokedcertbuilder.py
rename to tests/x509/test_x509_revokedcertbuilder.py