skip to navigation
skip to content

karellen-testing 0.0.1.dev20161012185112

Karellen Testing Frameworks and Utilities

Karellen Testing Frameworks and Utilities

This project aggregates testing frameworks and utilities for all of the projects under Karellen umbrella.

Mock

A collection of Mock utilities helping with common tasks

Spy

from unittest import TestCase
from karellen.testing.mock import MagicSpy


class Class_A(object):
    def method_X(self):
        self.method_Y()

    def method_Y(self):
        pass


class TestSpy(TestCase):
    def test_class_a_api(self):
        mock = MagicSpy(Class_A())

        mock.method_X()
        mock.method_Y.assert_called_once_with()
 
File Type Py Version Uploaded on Size
karellen-testing-0.0.1.dev20161012185112.tar.gz (md5, pgp) Source 2016-10-12 4KB
karellen_testing-0.0.1.dev20161012185112-py3-none-any.whl (md5, pgp) Python Wheel 3.5 2016-10-12 6KB