pytest-dev / pytest-dev/pytest-factoryboy

Fix tests/test_postgen_dependencies::test_postgen_related

Open
#157 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
400
Forks
44
Avg merge
6h 34m
Merged PRs (30d)
1

Description

The test is currently marked as xfailed because we never asserted that functionality, but it should pass instead.
Basically:

class FooFactory:
    baz = factory.RelatedFactory(BazFactory, "foo")

does not set the baz.foo attribute to the foo created.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with tests/test_postgen_dependencies::test_postgen_related, which is currently marked xfailed, and read the related factory setup around the FooFactory and BazFactory example. The work is done when the test passes and asserts that the created baz.foo attribute refers to the foo created for FooFactory.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.