pytest-envvars icon indicating copy to clipboard operation
pytest-envvars copied to clipboard

Sample app

Open rafaelhenrique opened this issue 6 years ago • 8 comments

Create a sample app using either django and flask to explain use of pytest-envvars.

rafaelhenrique avatar Oct 28 '19 15:10 rafaelhenrique

I'll take this one :)

I'll start with django though.

lsantosdemoura avatar Oct 28 '19 15:10 lsantosdemoura

i'll take this and i will work on flask

nishant-sethi avatar Oct 28 '19 15:10 nishant-sethi

@rafaelhenrique can you briefly describe what exactly is your expectation

nishant-sethi avatar Oct 28 '19 16:10 nishant-sethi

Yep @nishant-sethi ...

Accourding readme...

pytest-envvars randomize values of environment variables on your unit tests to check consistency of mocks about configuration. If the test has a wrong mock, this test will be broken.

So... we need create sample of use on django and flask, to improve documentation. To do this, we need create simple apps, with tests.... some tests needs fail when pytest call plugin, and another tests needs pass when pytest call plugin. Writing this apps is more easily explain the purpouse of plugin to another people.

Thanks @nishant-sethi !

rafaelhenrique avatar Oct 28 '19 17:10 rafaelhenrique

@lsantosdemoura I talked to a friend and he gave me the idea of creating a samples folder in the same project, what do you think?

I think this is sounds good, because we dont need maintain a new branch and dont need maintain a new repository.

rafaelhenrique avatar Oct 29 '19 23:10 rafaelhenrique

That really makes more sense, creating a folder with the implementations is better than different branches for each one, I'll change that on the project and make(would it be a "do"?) a PR

lsantosdemoura avatar Oct 30 '19 13:10 lsantosdemoura

Yep, the common stream of github is a..

fork project ->
   use your fork ->
      change things ->
         make pull request on original project using your fork

On your fork you add an sample directory like this:

sample ->
    django_project ->
        your source code here

Sounds good @lsantosdemoura ?

rafaelhenrique avatar Oct 30 '19 13:10 rafaelhenrique

Yep! Sounds great!

lsantosdemoura avatar Oct 30 '19 13:10 lsantosdemoura