title: pytest / django: multiple fixtures, multiple assertions, asserting expectations
body: <p>I have a working, valid test for a django project, <code>dummy_book</code> and <code>test_profile</code> are both fixtures. Notice it has two assertions:</p>
  
  <pre class="lang-py prettyprint-override"><code>def test_correct_items_in_feed(client, dummy_book, test_profile):
      some_author = dummy_book.author_set.first()
      # profile subscribes to author
      Subscription.attempt_addition_by_id(test_profile, some_author.vendor_id)
      client.login(username=test_profile.user.username, password="somepassword")
      test_profile.save()
      # wants fiction books, feed requested
      requested_url = reverse("personal_feed", args=[test_profile.auth_token])
      resp = client.get(requested_url, follow=True)
      assert dummy_book.title in str(resp.content)
      # user no longer wants fiction books, feed requested
      test_profile.notify_fiction = False
      test_profile.save()
      resp = client.get(f"/users/feeds/{test_profile.auth_token}", follow=True)
      assert dummy_book.title not in str(resp.content)
  </code></pre>
  
  <p>What I'm looking to implement now is a way to test two different <code>test_profile</code>s:</p>
  
  <ol>
  <li><p>one <code>test_premium_profile</code> which is allowed to filter <code>Book</code>s by type (notice the model attribute <code>test_profile.notify_fiction</code>)</p></li>
  <li><p>Another <code>test_free_profile</code> which is NOT allowed to filter <code>Book</code>s by type</p></li>
  </ol>
  
  <p>I already have the logic for the above, which simply ignores <code>test_free_profile</code>'s preferences regarding this atrribute.</p>
  
  <p>The challenge here comes from the fact that for these two different profiles, we need to assert different assertions. Specifically, for <code>test_free_profile</code> <code>dummy_book.title</code> should be in the <code>resp.content</code> in both scenarios, while for <code>test_premium_profile</code> it should only be there in the first scenario.</p>
  
  <p>How can I arrange these different assertions for both kinds of <code>Profile</code>s, without duplicating this test and the code in it?</p>
  
  <p>I know one easier solution is to split this test into two, but I'm not interested in that and for the sake of education that is out of the question.</p>