This repository has been archived on 2019-10-13. You can view files and clone it, but cannot push or open issues or pull requests.
2018-04-16 23:31:24 +02:00

25 lines
766 B
Python

# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.test import TestCase
from apps.food.models import SingleFood
# Create your tests here.
class SingleFood_Scope(TestCase):
def setUp(self):
SingleFood.objects.create(name="testfood")
def test_food_created_just_with_name(self):
"""Animals that can speak are correctly identified"""
food = SingleFood.objects.get(name="testfood")
self.assertEqual(food.name, 'testfood')
self.assertIsNone(food.allergens.all().first(), [])
self.assertIsNone(food.price_employee)
self.assertIsNone(food.price_guest)
self.assertIsNone(food.price_student)
self.assertIsNone(food.image)
self.assertEqual(food.rating, 0.0)