Giter Site home page Giter Site logo

steffen-kiess / k5test Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pythongssapi/k5test

0.0 0.0 0.0 49 KB

A library for setting up self-contained Kerberos 5 environments (based on code from MIT krb5, but supports Heimdal)

License: Other

Python 100.00%

k5test's Introduction

K5Test

k5test is a library for setting up self-contained Kerberos 5 environments, and running Python unit tests inside those environments. It is based on the file of the same name found alongside the MIT Kerberos 5 unit tests.

Using k5test to set up a Kerberos 5 deployment

k5test can be used to set up a self-contained MIT krb5 or Heimdal environment. This is useful for testing applications without having to manipulate existing Kerberos realms, or having to set up a full Kerberos deployment by hand.

To set up a realm, use the k5test.K5Realm class. The constructor accepts several useful arguments for controlling which parts get set up; refer to the inline documentation for more information.

Using k5test to run unit tests

Instead of having test cases inherit from unittest.TestCase, inherit from k5test.KerberosTestCase, which will automatically set up a Kerberos 5 environment, before the test case, and tear it down afterwards.

Additionally, several decorators are defined. the k5test.gssapi_extension_test(extension_name, human_readable_name) decorator (which requires python-gssapi) allows you to skip tests with installations that don't support a particular GSSAPI extension. The the k5test.krb_minversion_test(target_version, problem_name) decorator allows you to skip tests when running a version of krb5 less that the required version. The k5test.krb_plugin_test(plugin_type, plugin_name) decorator allows you to skip tests for installations that don't have a particular plugin installed.

k5test's People

Contributors

jborean93 avatar frozencemetery avatar directxman12 avatar stanislavlevin avatar mgorny avatar carlwgeorge avatar jayvdb avatar promyloph avatar rissson avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.