• Stars
    star
    13
  • Rank 1,512,713 (Top 30 %)
  • Language
    Python
  • License
    MIT License
  • Created about 7 years ago
  • Updated about 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Bones for faster unit testing based on the command line.

utbone

Make templates for faster unit testing.

Travis Release Python3 Python3 Python3

Bones for

  • unittesting.
  • unittesting already with mock and ddt.
  • django testing.
  • django testing already with mock and ddt.

Install

Following command in your terminal:

pip install utbone

Or install source code and follow this:

python setup.py install

Quick start or how to use

For creating this bone with name test_views in mysite/polls/tests use next command:

utbone mysite/polls/tests test_views django --topping

--topping here means, that you need ready mock and ddt.

Result is next:

"""
Tests for
"""
from ddt import ddt, data, unpack
from mock import patch

from django.test import TestCase


class Test(TestCase):
    """
    Tests for
    """

    def setUp(self):
        """
        Initialize
        """
        pass

    def test_first(self):
        """
        Verify that
        """
        self.assertEqual(1, '1')

    @patch('')
    def test_second(self, mock_):
        """
        Assert that
        """
        pass

    @data(
        ('first', 'second', 'expected'),
        ('first', 'second', 'expected'),
    )
    @unpack
    def test_third(self, first, second, expected):
        """
        Make sure when
        """
        pass

CLI

utbone is easy to understand: utbone [path to append bone] [name for test] [type of test] -[t]/--[topping]. -t or --topping (the same option) is an optional parameter.

Follow this command to call full guide how to use this tool:

utbone --help

More Repositories

1

threads-net

Unofficial and reverse-engineered Threads (threads.net) Python API wrapper. Created for academic purposes and is not intended to be used in real software.
Python
422
star
2

diagrams-as-code

Diagrams as code: declarative configurations using YAML for drawing cloud system architectures.
Python
303
star
3

accessify

Python design kit: interfaces, declared exception throws, class members accessibility levels (private and protected methods for humans).
Python
108
star
4

django-telegram-login

The reusable Django application for Telegram authorization (also known as Telegram login).
Python
100
star
5

8-bit-computer-memory-init

Initialize the 8-bit computer memory with a program to be executed automatically on powering.
C++
65
star
6

heroku-load-balancer

Inexpensive load balancer to replace Heroku’s built-in one. The way to host CPU-bound.
Python
65
star
7

stale-feature-branch-operator

Delete stale feature branches in a Kubernetes cluster.
Go
51
star
8

DuttyBot

University timetable bot.
Python
28
star
9

pdbe

Debug the whole project, particular app or file with only one terminal command. Also pdbe provides features to work with debugging in the Git style.
Python
23
star
10

Rutetider

iOS, Android, Web-based and Telegram-bots timetable framework for universities. [not supported]
Python
23
star
11

github-story

Chrome and Firefox extension to use pull request description template with a single button click.
JavaScript
10
star
12

acg

Custom API-client based on any existing API from one configuration file.
Python
9
star
13

project-version

Explicit, strict and automatic project version management based on semantic versioning.
Python
5
star
14

DOU

Read dou.ua on your iPhone.
Swift
2
star