Skip to content

Instantly share code, notes, and snippets.

View vahedq's full-sized avatar

Vahed Qazvinian vahedq

View GitHub Profile
@vahedq
vahedq / xml_test.py
Last active June 11, 2018 21:53
Django TestCase for XML comparison
from django.test import TestCase
from doctest import Example
from lxml.doctestcompare import LXMLOutputChecker
class XmlTestCase(TestCase):
def assertXmlEqual(self, got, want):
checker = LXMLOutputChecker()
if not checker.check_output(want, got, 0):
message = checker.output_difference(Example('', want), got, 0)
raise AssertionError(message)
@vahedq
vahedq / ms-office-react.html
Last active June 11, 2018 21:47
React app with Office Javascript APIs.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">
<title>test page</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.5.4/react.js"></script>