factor out function to dump crl
diff --git a/tests/test_crypto.py b/tests/test_crypto.py
index 196e490..d9a9526 100644
--- a/tests/test_crypto.py
+++ b/tests/test_crypto.py
@@ -31,7 +31,7 @@
 from OpenSSL.crypto import dump_certificate_request, dump_privatekey
 from OpenSSL.crypto import PKCS7Type, load_pkcs7_data
 from OpenSSL.crypto import PKCS12, PKCS12Type, load_pkcs12
-from OpenSSL.crypto import CRL, Revoked, load_crl
+from OpenSSL.crypto import CRL, Revoked, dump_crl, load_crl
 from OpenSSL.crypto import NetscapeSPKI, NetscapeSPKIType
 from OpenSSL.crypto import (
     sign, verify, get_elliptic_curve, get_elliptic_curves)
@@ -3206,6 +3206,14 @@
         """
         self.assertRaises(Error, load_crl, FILETYPE_PEM, b"hello, world")
 
+    def test_dump_crl(self):
+        """
+        The dumped CRL matches the original input.
+        """
+        crl = load_crl(FILETYPE_PEM, crlData)
+        buf = dump_crl(FILETYPE_PEM, crl)
+        assert buf == crlData
+
 
 class X509StoreContextTests(TestCase):
     """