def METHOD_NAME(self):
    """
    Tests that weight entries are automatically created or updated
    """
    self.user_login('test')
    user = User.objects.get(username=self.current_user)
    # Existing weight entry is old, a new one is created
    entry1 = WeightEntry.objects.filter(user=user).latest()
    response = self.client.post(
        reverse('nutrition:bmi:calculate'), {
            'height': 180,
            'weight': 80
        }
    )
    self.assertEqual(response.status_code, 200)
    entry2 = WeightEntry.objects.filter(user=user).latest()
    self.assertEqual(entry1.weight, 83)
    self.assertEqual(entry2.weight, 80)
    # Existing weight entry is from today, is updated
    entry2.delete()
    entry1.date = datetime.date.today()
    entry1.save()
    response = self.client.post(
        reverse('nutrition:bmi:calculate'), {
            'height': 180,
            'weight': 80
        }
    )
    self.assertEqual(response.status_code, 200)
    entry2 = WeightEntry.objects.filter(user=user).latest()
    self.assertEqual(entry1.pk, entry2.pk)
    self.assertEqual(entry2.weight, 80)
    # No existing entries
    WeightEntry.objects.filter(user=user).delete()
    response = self.client.post(
        reverse('nutrition:bmi:calculate'), {
            'height': 180,
            'weight': 80
        }
    )
    self.assertEqual(response.status_code, 200)
    entry = WeightEntry.objects.filter(user=user).latest()
    self.assertEqual(entry.weight, 80)
    self.assertEqual(entry.date, datetime.date.today())