Skip to content

Commit

Permalink
Merge pull request #43 from stphivos/version/0.0.16
Browse files Browse the repository at this point in the history
Upload v0.0.16 to pypi
  • Loading branch information
stphivos authored Mar 14, 2017
2 parents 9064f4f + ee8b449 commit 7ed7f27
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ dist/
*migrations/
MANIFEST
patches.py
/examples/users/db.sqlite3
db.sqlite3
15 changes: 0 additions & 15 deletions CHANGELOG.md

This file was deleted.

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include setup.cfg README.md requirements/requirements.txt
recursive-include django_mock_queries *.py
3 changes: 3 additions & 0 deletions django_mock_queries/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ def _meta(self):
keys_list.remove('save')
return MockOptions(*keys_list)

def __repr__(self):
return self.get('mock_name', None) or super(MockModel, self).__repr__()


def create_model(*fields):
if len(fields) == 0:
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements-testing.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-r requirements.txt
# -r requirements.txt

pip-tools==1.7.0
pytest==3.0.3
Expand Down
7 changes: 1 addition & 6 deletions requirements/requirements-testing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,11 @@
click==6.6 # via pip-tools
configparser==3.5.0 # via flake8
coverage==3.7.1
# Django==1.8.12 # via model-mommy, manually excluded for tox
djangorestframework==3.3.2
enum34==1.1.6 # via flake8
first==2.0.1 # via pip-tools
flake8==3.0.4 # via pytest-flake8
funcsigs==1.0.2
mccabe==0.5.2 # via flake8
mock==1.3.0
model-mommy==1.2.6
pbr==1.10.0
pip-tools==1.7.0
pluggy==0.3.1 # via tox
py==1.4.31 # via pytest, tox
Expand All @@ -26,6 +21,6 @@ pytest-cov==2.4.0
pytest-django==3.1.2
pytest-flake8==0.7
pytest==3.0.3
six==1.10.0
six==1.10.0 # via pip-tools
tox==2.1.1
virtualenv==13.1.2
2 changes: 1 addition & 1 deletion requirements/requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mock==1.3.0
model_mommy==1.2.6
Django==1.8.12
Django>=1.8.17,<1.10.99
4 changes: 2 additions & 2 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#
# pip-compile --output-file requirements/requirements.txt requirements/requirements.in
#
Django==1.8.12 # via model_mommy
Django>=1.8.17,<1.10.99 # manually edited and should remain a range of supported versions
funcsigs==1.0.2 # via mock
mock==1.3.0
model_mommy==1.2.6
pbr==1.10.0 # via mock
pbr==2.0.0 # via mock
six==1.10.0 # via mock, model_mommy
7 changes: 6 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
from distutils.core import setup
from pip.req import parse_requirements

install_req = parse_requirements('requirements/requirements.txt', session='skip')
req = [str(ir.req) for ir in install_req]

setup(
name='django_mock_queries',
packages=['django_mock_queries'],
version='0.0.15',
version='0.0.16.5',
description='A django library for mocking queryset functions in memory for testing',
author='Phivos Stylianides',
author_email='[email protected]',
url='https://github.com/stphivos/django-mock-queries',
keywords=['django', 'mocking', 'unit-testing', 'tdd'],
classifiers=[],
install_requires=req
)
4 changes: 4 additions & 0 deletions tests/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,3 +741,7 @@ def test_length2(self):
def test_create_model_raises_value_error_with_zero_arguments(self):
with self.assertRaises(ValueError):
create_model()

def test_query_model_repr_returns_mock_name(self):
model = MockModel(mock_name='model_name')
assert repr(model) == model.mock_name

0 comments on commit 7ed7f27

Please sign in to comment.