Fakultas Ilmu Komputer UI

Commit 2635df36 authored by Ami's avatar Ami
Browse files

resolve merge conflict between staging and PBI-12

parent 2ef0ec65
Pipeline #76403 passed with stages
in 15 minutes and 38 seconds
# Generated by Django 3.1 on 2021-05-11 08:10
from django.db import migrations
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('diet_questionnaire', '0007_auto_20210511_0104'),
]
operations = [
migrations.AlterField(
model_name='dietquestionnaire',
name='physical_activity',
field=multiselectfield.db.fields.MultiSelectField(blank=True, choices=[(1, 'Hampir tidak pernah olahraga'), (2, 'Jogging'), (3, 'Senam aerobic, zumba, yoga, dan sejenisnya'), (4, 'Sepak bola/Futsal'), (5, 'Renang'), (6, 'Basket'), (7, 'Bulutangkis'), (8, 'Voli'), (9, 'Lainnya')], max_length=17, null=True),
),
]
# Generated by Django 3.1 on 2021-05-11 09:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('diet_questionnaire', '0008_auto_20210511_1510'),
]
operations = [
migrations.AlterField(
model_name='dietquestionnaire',
name='user',
field=models.OneToOneField(blank=True, max_length=200, on_delete=django.db.models.deletion.CASCADE, related_name='diet_questionnaire', to=settings.AUTH_USER_MODEL),
),
]
# Generated by Django 3.1 on 2021-05-11 09:23
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('diet_questionnaire', '0009_auto_20210511_1623'),
]
operations = [
migrations.AlterField(
model_name='dietquestionnaire',
name='user',
field=models.OneToOneField(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='diet_questionnaire', to=settings.AUTH_USER_MODEL),
),
]
......@@ -62,6 +62,28 @@ class GetProfilesAndCSVTest(APITestCase):
current_condition=1,
problem_to_solve=1,
health_problem=[2, 3])
cls.diet_profile_3 = DietProfile.objects.create(
name="test22",
email="test22@test3.com",
age=22,
weight=61,
height=172,
gender=2,
special_condition=1,
body_activity=1,
vegetables_in_one_day=1,
fruits_in_one_day=1,
fried_food_in_one_day=1,
sweet_snacks_in_one_day=1,
sweet_drinks_in_one_day=1,
packaged_food_in_one_day=1,
large_meal_in_one_day=1,
snacks_in_one_day=1,
breakfast_type=1,
current_condition=1,
problem_to_solve=1,
health_problem=[2, 3])
cls.nutritionist = Nutritionist.objects.create(
id=1,
......@@ -128,80 +150,8 @@ class GetProfilesAndCSVTest(APITestCase):
name='tes',
email='tesst@test.com',
password='abc',
diet_profile=cls.diet_profile_2,
diet_profile=cls.diet_profile_3,
nutritionist=cls.nutritionist)
cls.diet_questionnaire = DietQuestionnaire.objects.create(
meal_provider = [
1,
2,
3
],
complaint = [
1,
2,
3,
4,
5,
6
],
agree_to_all_statements_consent = 1,
personal_data_consent = 1,
general_purpose = 1,
date_of_birth = "1995-12-30",
city_and_area_of_residence = "yang jauh disana",
handphone_no = "081234567890",
whatsapp_no = "080987654321",
profession = 4,
last_education = 5,
meal_preference = 2,
waist_size = 60,
dietary_change = 2,
has_weigher = 1,
breakfast_frequency = 3,
breakfast_meal_type = 2,
sweet_tea_consumption_frequency = 9,
coffee_consumption_frequency = 9,
milk_consumption_frequency = 9,
other_drink_consumption_frequency = 9,
additional_sugar_in_a_day = 7,
liquid_consumption_frequency = 3,
meal_consumed_almost_every_day = "gaada",
unliked_food = "semua",
preferred_food_taste = "gaada",
expected_food_on_breakfast = "makanan mahal",
expected_food_on_lunch_dinner = "makanan murah",
breakfast_meal_explanation = "-",
morning_snack_explanation = "ga nyemil",
lunch_meal_explanation = "-",
evening_snack_explanation = "-",
dinner_meal_explanation = "makan enak",
night_snack_explanation = "indomi",
food_alergies = "-",
diet_drinks = "-",
cigarette_alcohol_condition = [
4
],
multivitamin_tablet_suplement = "-",
physical_activity = [
"jogging",
"basket",
"apa aja boleh"
],
diet_and_life_style_story = "-",
disease = [
18
],
regular_drug_consumption = "obatobatan",
other_disease = "dis-ease",
motivation_using_dietela = "-",
dietela_nutritionist_expectation = "-",
dietela_program_expectation = "-",
finished_steps = [
1
],
user = cls.custom_user_4
)
def test_get_all_users(self):
response = self.client.get(self.BASE_URL)
......
......@@ -90,4 +90,3 @@ class ExportCSVTimDietela(APIView):
writer.writerow(col_list)
return response
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment