factoryboy pytest session management

I am using pytest as framework for testing my application and I want to use pytest factoryboy as well. Thusfar, my conftest.py looks pretty much like the example: import factory from sqlalchemy...

How to prevent FactoryBoy from reusing object of a SubFactory?

I have the following factories: class UserFactory(factory.DjangoModelFactory): class Meta: model = get_user_model() class ProProfileFactory(factory.DjangoModelFactory): user =...

Parametrize attributes of Django-models with multi-table inheritance in pytest-factoryboy

I am using Django and want to write a test using pytest, pytest-django, pytest-factoryboy and pytest-lazyfixtures. I have Django-models that are using multi-table inheritance, like...

Patch a variable inside a method of a class instance

I am trying to understand how patching works and I am testing with pytest a Django View: views.py from django.contrib.auth.views import LoginView class MyLoginView(LoginView): ...

Is it possible to test GTK3 applications with tox?

I try to do the right thing and write some unittests for a GTK3 application. My stack consists of Python2.7, tox, and pytest. Running the following with pytest works just fine: import...

Testing of async tornado RequestHandler method in a complex environment

I am trying to write unit testing code for a child of tornado.web.RequestHandler that runs an aggregate query to the database. I have already wasted several days trying to get the tests to...

Can't install any pip package within my docker environment, since it won't be recognized

I am running a Cookiecutter django project in a docker environment and I would like to add new packages via pip. Specifically I want to add: djangorestframework-jwt When I do: docker-compose -f...

Deploying to AWS failed, requirement.txt returned non-zero exit status 1

I'm very new to AWS and I didn't do the deployment myself. Can anyone give me an idea on what's happening here and what could be wrong? This is a Django project and it's running locally just fine....