1
# Copyright (C) 2012 Linaro
3
# This file is part of linaro-ci-dashboard.
5
# linaro-ci-dashboard is free software: you can redistribute it and/or modify
6
# it under the terms of the GNU Affero General Public License as published by
7
# the Free Software Foundation, either version 3 of the License, or
8
# (at your option) any later version.
10
# linaro-ci-dashboard is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU Affero General Public License for more details.
15
# You should have received a copy of the GNU Affero General Public License
16
# along with linaro-ci-dashboard. If not, see <http://www.gnu.org/licenses/>.
17
from django.test import TestCase
20
from frontend.android_build.views.android_loop_create_view \
21
import AndroidLoopCreateView
24
class AndroidBuildViewsTest(TestCase):
27
self.mock_loop = Mock()
29
def test_create_view_get_context_data(self):
30
android_loop_create_view = AndroidLoopCreateView()
31
android_loop_create_view.request = "some request data"
32
android_loop_create_view.object = self.mock_loop
33
context = AndroidLoopCreateView.get_context_data(
34
android_loop_create_view)
35
self.assertEqual(context['request'], "some request data")