Skip to content

Instantly share code, notes, and snippets.

View jtomasek's full-sized avatar

Jiri Tomasek jtomasek

  • SUSE
  • Usti nad Orlici, Czech Republic
View GitHub Profile
+------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------+
| GUI Actions |
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
def test_index_nodes_list_exception(self):
with patch.object(tuskar.BaremetalNode, 'list') as mock_method:
mock_method.side_effect = self.exceptions.tuskar
res = self.client.get(INDEX_URL)
self.assertEqual(mock_method.call_count, 1)
self.assertRedirectsNoFollow(res, RESOURCES_OVERVIEW_URL)
# -*- coding: utf8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
Page not found (404)
Request Method: GET
Request URL: http://fedora18vm:3000/jasmine/TemplatesTests/
Using the URLconf defined in openstack_dashboard.urls, Django tried these URL patterns, in this order:
^$ [name='splash']
^auth/
^home/$ [name='user_home']
^i18n/js/(?P<packages>\S+?)/$ [name='jsi18n']
^i18n/setlang/$ [name='set_language']
^i18n/
DEST=/opt/stack
DATA_DIR=$DEST/data
# no loging to file, it's far to big
# LOGFILE=$DATA_DIR/logs/stack.log
# SCREEN_LOGDIR=$DATA_DIR/logs
VERBOSE=True
disable_service mysql
enable_service postgresql
disable_service rabbit
@jtomasek
jtomasek / gist:7303213
Created November 4, 2013 14:25
Bootstrap 3 lesscpy compilation
(.venv)→ ../Lesscpy/bin/lesscpy openstack_dashboard/static/bootstrap/less/bootstrap.less -g -V
Generating LALR tables
WARNING: 192 shift/reduce conflicts
Compiling target: openstack_dashboard/static/bootstrap/less/bootstrap.less
PLY: PARSE DEBUG START
State : 0
Stack : . LexToken(css_import,'@import',12,254)
Action : Shift and goto state 26
FAIL: test_detail_invalid_port_range (openstack_dashboard.dashboards.project.access_and_security.security_groups.tests.SecurityGroupsViewTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/jtomasek/horizon/openstack_dashboard/test/helpers.py", line 83, in instance_stub_out
return fn(self)
File "/home/jtomasek/horizon/openstack_dashboard/dashboards/project/access_and_security/security_groups/tests.py", line 356, in test_detail_invalid_port_range
self.assertContains(res, "greater than or equal to")
File "/home/jtomasek/horizon/.venv/lib/python2.7/site-packages/django/test/testcases.py", line 664, in assertContains
msg_prefix + "Couldn't find %s in response" % text_repr)
AssertionError: Couldn't find 'greater than or equal to' in response
@jtomasek
jtomasek / gist:6636825
Created September 20, 2013 12:37
media.less
/*
CSS media groups
*/
@media screen, projection {
html {
background: #fffef0;
color: #300;
}
body {
max-width: 35em;
in test/less/media.less
@variable: 768px;
@media (min-width: @variable) {
aside { float: left; }
}
in test/css/media.css
@media (min-width: 768px) {