This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@pytest.mark.parametrize("a,b,expected", [ | |
(NUMBER_1, NUMBER_2, NUMBER_1), | |
(NUMBER_2, NUMBER_1, NUMBER_1), | |
(NUMBER_1, NUMBER_1, NUMBER_1), | |
]) | |
def test_maximum(a, b, expected): | |
assert maximum(a, b) == expected | |
@pytest.mark.parametrize("a,b,expected", [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from com.automationpanda.example.calc_func import * | |
class Calculator(object): | |
def __init__(self): | |
self._last_answer = 0.0 | |
@property | |
def last_answer(self): | |
return self._last_answer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from com.automationpanda.example.calc_class import Calculator | |
# "Constants" | |
NUMBER_1 = 3.0 | |
NUMBER_2 = 2.0 | |
# Fixtures |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Id: OCST-1.1.1 | |
# Status: Confirmed | |
# Service: AWS EC2 | |
# Components: | |
# - User Data | |
# STRIDE: | |
# - Elevation of privilege | |
# - Information disclosure | |
# References: | |
# - https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- The link tag within the head section adds the favicon to the page. --> | |
<!-- Presume that the favicon is a static file accessible at the images/favicon path. --> | |
<!-- Remember to "load static", too! --> | |
{% load static %} | |
<html lang="en"> | |
<head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- This is a basic example of a Django parent template. --> | |
<!-- It adds a favicon to the page. --> | |
<!-- The title is set by overriding the "title" block. --> | |
<!-- Body content is added by overriding the "content" block. --> | |
<!-- Tweak this parent template to meet your project's needs. --> | |
{% load static %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is an example of a Django child template. --> | |
<!-- It extends: https://gist.github.com/d7f20ccd5620f64d761ec546fd9eb37a --> | |
<!-- The parent template sets the favicon. --> | |
{% extends "django_example_parent.html" %} | |
{% block title %}My Page{% endblock %} | |
{% block content %} | |
<div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- The path and name for this file should be "templates/admin/base_site.html". --> | |
<!-- It overrides the original admin template and will be picked up by all of its children. --> | |
<!-- This template override has been verified for Django 1.11 and 2.0. --> | |
{% extends "admin/base_site.html" %} | |
{% load static %} | |
{% block extrahead %} | |
<link rel="shortcut icon" href="{% static 'images/favicon.ico' %}" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- The path and name for this file should be "templates/rest_framework/api.html". --> | |
<!-- It overrides the original browsable API template and will be picked up by all of its children. --> | |
<!-- This template override has been verified for Django 2.0. --> | |
{% extends "rest_framework/base.html" %} | |
{% load static %} | |
{% block style %} | |
{{ block.super }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEMPLATES = [ | |
{ | |
# ... | |
'DIRS': [os.path.join(BASE_DIR, 'templates')], | |
# ... | |
}, | |
] |