def test_search_non_residential_with_area(self):
     building = Building.search_non_residential(
         VacancyUser.objects.get(username='******'),
         Pref.objects.get(pk=26),  # 京都
         City.objects.get(pk=26102),  # 京都市上京区
         Area.objects.get(pk=26018),  # 今出川
     ).first()
     self.assertEqual(building.building_name, '表示項目確認用マンション')
 def test_search_non_residential_with_pref(self):
     building = Building.search_non_residential(
         VacancyUser.objects.get(username='******'),
         Pref.objects.get(pk=26),  # 京都
         None,
         None,
     ).first()
     self.assertEqual(building.building_name, '表示項目確認用マンション')
 def test_search_with_area_id_only_non_residential(self):
     building = Building.search_with_area_id(
         26018,  # 今出川
         VacancyUser.objects.get(username='******'),
         False,
         True,
     ).first()
     self.assertEqual(building.building_name, '表示項目確認用マンション')
 def test_search_with_area_id(self):
     building = Building.search_with_area_id(
         26004,  # 大宮
         VacancyUser.objects.get(username='******'),
         True,
         False,
     ).first()
     self.assertEqual(building.building_name, 'サンプルマンション')
 def test_search_garage_with_name(self):
     building = Building.search_garage(
         VacancyUser.objects.get(username='******'),
         'サンプルガレージ',
         None,
         None,
         None,
     ).first()
     self.assertEqual(building.building_name, 'サンプルガレージ01')
 def test_search_garage_with_area(self):
     building = Building.search_garage(
         VacancyUser.objects.get(username='******'),
         None,
         Pref.objects.get(pk=26),  # 京都
         City.objects.get(pk=26106),  # 京都市下京区
         Area.objects.get(pk=26053),  # 京阪五条
     ).first()
     self.assertEqual(building.building_name, 'サンプルガレージ01')
 def test_get_recommended_buildings(self):
     building = Building.get_recommended_buildings(
         VacancyUser.objects.get(username='******'), ).first()
     self.assertEqual(building.building_name, 'サンプルマンション')
 def test_search_with_building_name(self):
     building = Building.search_with_building_name(
         'サンプル',
         VacancyUser.objects.get(username='******'),
     ).first()
     self.assertEqual(building.building_name, 'サンプルマンション')